Answer the question
In order to leave comments, you need to log in
Why arguments in square brackets before class fields?
Sometimes, before declaring a class field, or even the class itself, you can see the arguments in [square brackets]
example of serialization from meatint
[Required]
public string Id { get; set; }
[Required]
[StringLength(50, MinimumLength=3)]
public string Name { get; set; }
[Required]
[Range(1, 100)]
public int Age { get; set;
[ServiceContract]
public interface IService
{
[OperationContract]
[WebGet]
string EchoWithGet(string s);
[OperationContract]
[WebInvoke]
string EchoWithPost(string s);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question