visual studio 2010 - Cannot initialize XML Serializer in C# -


[serializable] public class appdata {     public string datafile { get; set; }     public string logfile { get; set; }     public string uploadurl { get; set; }     public string rssurl { get; set; }     public icollection<rss.items> rssfeed = new collection<rss.items>(); } public class rss {     [serializable]     public struct items     {         public string guid;         public datetime date;         public string title;         public string description;         public string link;     } }  internal static appdata appdata; private static xmlserializer xml; static void main() {     xml = new xmlserializer(typeof(appdata)); } 

when run in vs 2010 debugger throws error there error reflecting type 'fol.appdata'. yes, code have more, basic parts. these within same assembly.

interfaces can't serialized - you'll need change this:

public icollection<rss.items> rssfeed = new collection<rss.items>(); 

to this:

public collection<rss.items> rssfeed = new collection<rss.items>(); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -