Make the classes public
public class viewmodel(){
public ClassA obj1 = new ClassA();
public ClassB obj2 = new ClassB();
}
or the code below
public class viewmodel(){
public ClassA obj1 {get;set;}
public ClassB obj2 {get;set;}
public viewmodel()
{
obj1 = new ClassA();
obj2 = new ClassB();
}
}
No comments:
Post a Comment