I have a class that has around 30 string properties in .Net 4.0
. I need all of them to be initialized as Empty String. Currently I am writing this logic in constructor. Is there any better way for doing this with lesser number of lines of code?
REFERENCES
CODE
public class MakeHoldDetail
{
public string Supplier { get; set; }
public string Loc { get; set; }
//constructor
public MakeHoldDetail()
{
Supplier = String.Empty;
Loc = String.Empty;
}
}