Please try to change
string [] fname={"std.GetName()", "std.GetGender()", "std.GetAge()", "std.GetMarks()", "std.GetStandard()", "std.GetDivision"};
as
string [] fname={std.GetName(), std.GetGender(), std.GetAge(), std.GetMarks(), std.GetStandard(), std.GetDivision};
and if your method not returning string value then please cast it into string
I have tried with your code
public void PrintRecord(ref Student std)
{
string[] tname = { "Name : ", "Gender : ","Age : "};
string[] fname = { std.GetName(), std.GetGender(), std.GetAge().ToString() };
string funName;
for (int index = 0; index < tname.Length; ++index)
{
funName = fname[index];
Response.Write(tname[index] + ":" + funName);
}
}
demo student class
public class Student
{
public string GetName()
{
return "soumen";
}
internal string GetGender()
{
return "M";
}
internal int GetAge()
{
return 32;
}
}
The output is
Name : :soumen Gender : :M Age : :32
Is that the output you want to display or please explain