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 HussainPosted Aug 13, 2013, 2:37 AM
Just declare in same line
public string Designation,shortname,Remarks;
public int CreatedUserID, ModifiedUserID ;
DateTime CreatedDate,ModifiedDate;
bool IsDeletable, IsEditable;
Regards,
Iftikar
VulpesPosted Aug 13, 2013, 2:49 AM
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.