Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
GeneralRe: check email Pin
michaelgr125-May-10 3:37
michaelgr125-May-10 3:37 
QuestionIssue with Calibri Fonts in Crystal Report Pin
Sebastian T Xavier24-May-10 22:57
Sebastian T Xavier24-May-10 22:57 
AnswerRe: Issue with Calibri Fonts in Crystal Report Pin
Abhinav S25-May-10 2:32
Abhinav S25-May-10 2:32 
Questionoutlook contacts Pin
michaelgr124-May-10 22:04
michaelgr124-May-10 22:04 
AnswerRe: outlook contacts Pin
Peace ON24-May-10 22:17
Peace ON24-May-10 22:17 
GeneralRe: outlook contacts Pin
michaelgr124-May-10 23:46
michaelgr124-May-10 23:46 
GeneralRe: outlook contacts Pin
Eddy Vluggen25-May-10 5:25
professionalEddy Vluggen25-May-10 5:25 
QuestionPass Parameter in Method in .NET Pin
Isaac Gordon24-May-10 21:32
Isaac Gordon24-May-10 21:32 
AnswerRe: Pass Parameter in Method in .NET Pin
Richard MacCutchan24-May-10 21:41
mveRichard MacCutchan24-May-10 21:41 
AnswerRe: Pass Parameter in Method in .NET [modified] Pin
Hristo-Bojilov24-May-10 21:42
Hristo-Bojilov24-May-10 21:42 
GeneralRe: Pass Parameter in Method in .NET Pin
Isaac Gordon24-May-10 21:59
Isaac Gordon24-May-10 21:59 
GeneralRe: Pass Parameter in Method in .NET Pin
Hristo-Bojilov24-May-10 22:12
Hristo-Bojilov24-May-10 22:12 
GeneralRe: Pass Parameter in Method in .NET Pin
Łukasz Nowakowski24-May-10 22:45
Łukasz Nowakowski24-May-10 22:45 
GeneralRe: Pass Parameter in Method in .NET Pin
Hristo-Bojilov24-May-10 22:50
Hristo-Bojilov24-May-10 22:50 
GeneralRe: Pass Parameter in Method in .NET Pin
Łukasz Nowakowski24-May-10 22:59
Łukasz Nowakowski24-May-10 22:59 
GeneralRe: Pass Parameter in Method in .NET Pin
Hristo-Bojilov24-May-10 23:06
Hristo-Bojilov24-May-10 23:06 
GeneralRe: Pass Parameter in Method in .NET Pin
Łukasz Nowakowski24-May-10 23:13
Łukasz Nowakowski24-May-10 23:13 
AnswerRe: Pass Parameter in Method in .NET Pin
Abhinav S25-May-10 2:37
Abhinav S25-May-10 2:37 
QuestionHow to persist user input value in textbox in windows application? Pin
amit_8324-May-10 21:06
professionalamit_8324-May-10 21:06 
AnswerRe: How to persist user input value in textbox in windows application? Pin
Peace ON24-May-10 21:09
Peace ON24-May-10 21:09 
QuestionWeb Project Type not available Pin
satsumatable24-May-10 19:06
satsumatable24-May-10 19:06 
AnswerRe: Web Project Type not available Pin
Peace ON24-May-10 20:45
Peace ON24-May-10 20:45 
QuestionSerialization Problem Pin
Kevin Marois24-May-10 13:00
professionalKevin Marois24-May-10 13:00 
I have a hierarchy of classes, all of which implement this interface:

public class IRuleObject
{
    int Sequence { get; set; }
}


Here's the top level class:

[Serializable] 
[XmlRoot("Group")]
public class RuleGroup : IRuleObject
{
    [XmlAttribute("ID")]
    public int GroupID { get; set; }

    [XmlAttribute("Sequence")]
    public int Sequence { get; set; }

    [XmlAttribute("Name")]
    public string GroupName { get; set; }
        
    [XmlAttribute("Active")]
    public bool Active { get; set; }
        
    [XmlElement("Rules")]
    public List<Rule> Rules { get; set; }
}


You can see where it implements the interface.

When I attempt to serialize I get

Type 'RulesEngine.IRuleObject' in Assembly 'RulesEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.


If I remove the interface, all works well. How do I set this up so i can use the interface & still serialize the
classes?
Everything makes sense in someone's mind

AnswerRe: Serialization Problem Pin
William Winner24-May-10 13:07
William Winner24-May-10 13:07 
GeneralRe: Serialization Problem Pin
Kevin Marois24-May-10 13:08
professionalKevin Marois24-May-10 13:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.