{
string name;
string address;
int Phonenumber;
}
class Program
{
static void Main(string[] args)
{
//this is better than d because Karena gak perlu super casting dan lebih gampang ketik
Customer c = Activator.CreateInstance
//this is slower
Customer d = (Customer)Activator.CreateInstance(typeof(Customer));
Customer e=CreateandLognewobject
Console.ReadLine();
}
static T CreateandLognewobject
{
T t = Activator.CreateInstance
Console.WriteLine("Created new object '{0}' ; {1}", t, s);
return t;
}
}
Tidak ada komentar:
Posting Komentar