Click here to Skip to main content
15,860,859 members
Home / Discussions / C#
   

C#

 
GeneralRe: What is the best way to call methods in a commom class? Pin
dan!sh 21-Oct-09 7:26
professional dan!sh 21-Oct-09 7:26 
GeneralRe: What is the best way to call methods in a commom class? Pin
Not Active21-Oct-09 7:49
mentorNot Active21-Oct-09 7:49 
GeneralRe: What is the best way to call methods in a commom class? Pin
dan!sh 21-Oct-09 7:59
professional dan!sh 21-Oct-09 7:59 
GeneralRe: What is the best way to call methods in a commom class? Pin
Not Active21-Oct-09 8:28
mentorNot Active21-Oct-09 8:28 
Questionscript Pin
netJP12L21-Oct-09 4:53
netJP12L21-Oct-09 4:53 
AnswerRe: script Pin
dan!sh 21-Oct-09 5:29
professional dan!sh 21-Oct-09 5:29 
AnswerRe: script Pin
Rob Branaghan21-Oct-09 5:32
Rob Branaghan21-Oct-09 5:32 
QuestionSerialization of a class which is inherriting from the TreeNode class Pin
mhouck21-Oct-09 3:49
mhouck21-Oct-09 3:49 
Thank you for reading.

I am attempting to propagate a nesting list architecture for use of displaying in a Tree View for management of text content, however I am having an issue with the serialization.

When attempting to populate my objects from serialization, I get the following error "There was an error reflecting type 'newClipboardManager.Directory'." with an inner response of "There was an error reflecting property 'ContextMenu'."

I would exclude all of the other members which are attempting to populate with the serialization, however the xmlIgnore is not something I can access. I would prefer to only have my important datamembers serialize, however I am at a stopping point. You can use the following snips for a reference:
Directory Class:
public class Directory : TreeNode
    {
        public string DirName
        {
            get{ return DirName;} 
            set{ 
                DirName = value;
                Name = value;
            }
        }
        public List<note> Notes { get; set; }
        public List<Directory> SubDirectory { get; set; }
        
        #region contructors

        public Directory()
        {
            this.Notes = new List<note>();
            this.SubDirectory = new List<Directory>();
        }

        public Directory( string dirName, List<note> notes )
        {
            this.DirName = dirName;
            this.Notes = new List<note>();
            this.SubDirectory = new List<Directory>();
            this.Notes = notes;
        }

        public Directory( string dirName )
        {
            this.DirName = dirName;
            this.SubDirectory = new List<Directory>();
            this.Notes = new List<note>();
        }
        #endregion

        public Directory getArray()
        {
            if (Notes.Count > 0)
            {
                foreach (note not in Notes)
                {
                    this.Nodes.Add(not);
                }
            }

            if (SubDirectory.Count > 0)
            {
                foreach (Directory dir in SubDirectory)
                {
                    this.Nodes.Add(dir.getArray());
                }
            }
            return this;
        }
    }


Content Class:
public class note : TreeNode
    {
       public string noteName {
            get { return noteName; }
            set { 
                noteName = value;
                Note = value;    
            }
        }
        public string Note { get; set; }
        public int ID { get; set; }

    }


Is there any simple method to ignore outlying data members for serialization? I have googled quite a lot and I am having a hard time with anything I find.
QuestionHow to Add a Column to an imported excel file to a DataGridView . Pin
nassimnastaran21-Oct-09 3:39
nassimnastaran21-Oct-09 3:39 
AnswerRe: How to Add a Column to an imported excel file to a DataGridView . Pin
dan!sh 21-Oct-09 5:28
professional dan!sh 21-Oct-09 5:28 
GeneralRe: How to Add a Column to an imported excel file to a DataGridView . Pin
nassimnastaran21-Oct-09 6:20
nassimnastaran21-Oct-09 6:20 
GeneralRe: How to Add a Column to an imported excel file to a DataGridView . Pin
dan!sh 21-Oct-09 7:57
professional dan!sh 21-Oct-09 7:57 
GeneralRe: How to Add a Column to an imported excel file to a DataGridView . Pin
nassimnastaran21-Oct-09 19:03
nassimnastaran21-Oct-09 19:03 
QuestionMDIParent Pin
Socheat.Net21-Oct-09 3:33
Socheat.Net21-Oct-09 3:33 
AnswerRe: MDIParent Pin
dan!sh 21-Oct-09 5:26
professional dan!sh 21-Oct-09 5:26 
Question[Message Deleted] Pin
RINSON VARGHESE21-Oct-09 2:40
RINSON VARGHESE21-Oct-09 2:40 
AnswerRe: c# RePost Pin
Richard MacCutchan21-Oct-09 2:42
mveRichard MacCutchan21-Oct-09 2:42 
Question[Message Deleted] Pin
RINSON VARGHESE21-Oct-09 2:39
RINSON VARGHESE21-Oct-09 2:39 
AnswerRe: advantages of c# Pin
Richard MacCutchan21-Oct-09 2:41
mveRichard MacCutchan21-Oct-09 2:41 
GeneralRe: advantages of c# Pin
musefan21-Oct-09 2:47
musefan21-Oct-09 2:47 
QuestionREF AND OUT VARIABLES Pin
RINSON VARGHESE21-Oct-09 2:10
RINSON VARGHESE21-Oct-09 2:10 
AnswerRe: REF AND OUT VARIABLES Pin
Luc Pattyn21-Oct-09 2:17
sitebuilderLuc Pattyn21-Oct-09 2:17 
AnswerRe: REF AND OUT VARIABLES [modified] Pin
musefan21-Oct-09 2:43
musefan21-Oct-09 2:43 
GeneralRe: REF AND OUT VARIABLES Pin
Luc Pattyn21-Oct-09 4:16
sitebuilderLuc Pattyn21-Oct-09 4:16 
AnswerRe: REF AND OUT VARIABLES Pin
Ghydo21-Oct-09 2:47
Ghydo21-Oct-09 2:47 

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.