int i = 3; i.GetType().ToString(); //System.Int32 byte b = 3; b.GetType.ToString(); //System.Byte string s = "test"; s.GetType.ToString(); //System.String Listlst = new List {4,9,18,3}; lst.GetType.ToString(); //System.Collections.Generic.List`1[System.Int32]
namespace mammal
{
class human
{
public int age;
public string sex;
public human(int a, string s) {age=a;sex=s;}
public string isex
{
get
{
return sex;
}
set
{
sex = value;
}
}
}
}
human Ryan = new human(18, "Male");
Ryan.GetType.ToString(); //mammal.human