I called my class clsEmpInfo from another class.
My code is,
// group-select.cs
clsEmpInfo objAlly = new clsEmpInfo(SetDataForAlly(getRow, userName));
private clsEmpInfo.getAlly SetDataForIME(GridViewRow getRow, string userName)
{
clsEmpInfo.getAlly Allyobj = new clsEmpInfo.getAlly();
Allyobj.user_id = getRow.Cells[1];
Allyobj.user_token = getRow.Cells[2];
Allyobj.user_name = userName;
}
when I do
clsEmpInfo objAlly = new clsEmpInfo(SetDataForAlly(getRow, userName));
gives error,
does not contain constructor that takes one arguments
Then visual studio generates constructor in clsEmpInfo
public class clsEmpInfo
{
// this is generated by visual studio
public clsEmpInfo(getAlly get_ally)
{
// TODO: Complete member initialization
this.get_ally = get_ally;
}
public class getAlly
{
public string user_id { get; set; } //PIN No (for IME)
public string user_token { get; set; }
public string user_name { get; set; }
}
}
what does this mean // TODO: Complete member initialization???
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shubham KumarPosted May 25, 2015, 1:30 AM
public, otherwise it can't be 'seen'.