vendredi 10 avril 2015

Null check each property in vIew Model


Vote count:

0





CustomerViewModel Cust=new CustomerViewModel();

class CustomerViewModel
{
public string name {get;set;}
public int Rollno {get;set;}
public string add{get;set;}
public int age {get;set;}
public string sub{get;set;}
public int mark{get;set;}
}


I need to check each individual property is null or empty in customerviewmodel and i need to collect the properties which is null. pick each property and check null this is only suit if we have less number of property.Give an idea to do this.



asked 40 secs ago







Null check each property in vIew Model

Aucun commentaire:

Enregistrer un commentaire