This is my class members i want to declare this in to single public function
string DesignationName, string ShortName, string Remarks, int CreatedUserID, DateTime CreatedDate, int ModifiedUserID, DateTime ModifiedDate, bool IsDeletable, bool IsEditable
eg like :
Public :
String Designation;
string shortname;
string Remarks;
int Crated Date
instead of
public string Designation;
public string shortname;
public Remarks;


Iftikar HussainRank #423 · 5.9K reputationPosted Aug 12, 2013, 10:37 PM EDT
Just declare in same line
public string Designation,shortname,Remarks;
public int CreatedUserID, ModifiedUserID ;
DateTime CreatedDate,ModifiedDate;
bool IsDeletable, IsEditable;
Regards,
Iftikar
VulpesRank #55 · 29.2K reputationPosted Aug 12, 2013, 10:49 PM EDT
In C# you have to use a separate access modifier (or accept the default modifier) with each declaration, though you can include multiple declarations on the same line as Iftikar said.