Click here to Skip to main content
15,906,766 members

Comments by balajitk (Top 2 by date)

balajitk 30-Mar-12 1:53am View    
hi lampiclobe,
i've created the same class by using your code.
dynamic p = new Person();
p.Name = "john";
p.Address = "address1";
p.Manager = "My Manager"; p.AddProperty("BirthDate", DateTime.Now); p.AddProperty("System.String", "Weigth", "70 kg");
Console.WriteLine("My name is {0}\nMy manager is {1}\nMy birth Date is {2}", p.Name, p.Manager, p.BirthDate);
string w = p.Weigth;
Console.WriteLine("My Weigth is: " + w);
Console.ReadKey();
but when i call this class property using dynamic it shows an error like follows

Error 202 One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?
balajitk 30-Mar-12 1:50am View    
Deleted
hi lampiclobe,


i've created the same class by using your code.
dynamic p = new Person();
p.Name = "john";
p.Address = "address1";
p.Manager = "My Manager";
p.AddProperty<datetime>("BirthDate", DateTime.Now);
p.AddProperty("System.String", "Weigth", "70 kg");
Console.WriteLine("My name is {0}\nMy manager is {1}\nMy birth Date is {2}",
p.Name, p.Manager, p.BirthDate);
string w = p.Weigth;
Console.WriteLine("My Weigth is: " + w);
Console.ReadKey();

but when i call this class property using dynamic it shows an error like follows

Error 202 One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?