Questions tagged «dynamicobject»


4
动态不包含项目引用中属性的定义
我收到一条错误消息: “对象”不包含“标题”的定义 所有代码也都在github上 我有一个看起来像这样的ConsoleApplication1 namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Movie m = new Movie(); var o = new { Title = "Ghostbusters", Rating = "PG" }; Console.WriteLine(m.PrintMovie(o)); } } } 和Movie.cs public class Movie : DynamicObject { public string PrintMovie(dynamic o) { return string.Format("Title={0} …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.