Click here to Skip to main content
15,899,026 members
Home / Discussions / C#
   

C#

 
AnswerRe: Cannot connect into SQL Server using C# Pin
Eddy Vluggen23-Apr-09 7:18
professionalEddy Vluggen23-Apr-09 7:18 
GeneralRe: Cannot connect into SQL Server using C# Pin
Gindi Bar Yahav23-Apr-09 7:28
Gindi Bar Yahav23-Apr-09 7:28 
GeneralRe: Cannot connect into SQL Server using C# Pin
Eddy Vluggen23-Apr-09 8:47
professionalEddy Vluggen23-Apr-09 8:47 
AnswerRe: Cannot connect into SQL Server using C# Pin
SayreCC23-Apr-09 15:41
SayreCC23-Apr-09 15:41 
GeneralRe: Cannot connect into SQL Server using C# Pin
Gindi Bar Yahav23-Apr-09 22:56
Gindi Bar Yahav23-Apr-09 22:56 
QuestionXML Serialisation on Circular Dependency Pin
EnlilCox23-Apr-09 6:19
EnlilCox23-Apr-09 6:19 
AnswerRe: XML Serialisation on Circular Dependency Pin
Le centriste23-Apr-09 9:10
Le centriste23-Apr-09 9:10 
GeneralRe: XML Serialisation on Circular Dependency Pin
EnlilCox23-Apr-09 22:13
EnlilCox23-Apr-09 22:13 
Hi, Thanks for replying.
I tried the XmlIgnore route but then realised that there is no AfterSerialisation on XML Serialisation which mean that it wasn't what I wanted.

With classes like this
<br />
    public class Book<br />
    {<br />
        public List<page> Pages { get; set; }<br />
        public string Title { get; set; }<br />
    }<br />
    public class Page<br />
    {<br />
        public Book ParentBook {get;set}<br />
        public List<chapter> Chapters { get; set; }<br />
        public int PageNo { get; set; }<br />
        public Page(Book parent)<br />
        {<br />
            ParentBook = parent;<br />
        }<br />
    }<br />
    public class Chapter<br />
    {<br />
        public Page ParentPage { get; set; }<br />
        public string Heading { get; set; }<br />
        public string Content { get; set; }<br />
        public Chapter (Page parent)<br />
        {<br />
            ParentPage = parent;<br />
        }<br />
    }<br />
</chapter></page>


I can do something like this

<br />
Book b = new Book() { Title = "My Book" };<br />
Page p = new Page(b) { PageNo = 1 };<br />
Chapter c = new Chapter(p) { Heading = "Introduction" };<br />
<br />
RenderChapterNavigation(c);<br />
<br />
private static void RenderChapterNavigation(Chapter c)<br />
{<br />
  if (c.ParentPage.Chapters.Count == 0)<br />
  {<br />
    RenderNoChaptersLink();<br />
  }else{<br />
    RenderChapters(c);<br />
  }<br />
}<br />


(this is not the exact code, but you can see how I can references the other chapters after having just passed in a Chapter object).
GeneralRe: XML Serialisation on Circular Dependency Pin
Le centriste24-Apr-09 2:30
Le centriste24-Apr-09 2:30 
GeneralRe: XML Serialisation on Circular Dependency Pin
EnlilCox26-Apr-09 23:07
EnlilCox26-Apr-09 23:07 
QuestionUnit Testing Pin
mark_w_23-Apr-09 5:09
mark_w_23-Apr-09 5:09 
AnswerRe: Unit Testing - WORKED IT OUT Pin
mark_w_23-Apr-09 5:15
mark_w_23-Apr-09 5:15 
QuestionDeploying custom fonts at Client Place Pin
ramz_g23-Apr-09 3:24
ramz_g23-Apr-09 3:24 
AnswerRe: Deploying custom fonts at Client Place Pin
Eddy Vluggen23-Apr-09 3:45
professionalEddy Vluggen23-Apr-09 3:45 
GeneralRe: Deploying custom fonts at Client Place Pin
ramz_g23-Apr-09 5:01
ramz_g23-Apr-09 5:01 
GeneralRe: Deploying custom fonts at Client Place Pin
Eddy Vluggen23-Apr-09 5:04
professionalEddy Vluggen23-Apr-09 5:04 
AnswerRe: Deploying custom fonts at Client Place Pin
Luc Pattyn23-Apr-09 5:12
sitebuilderLuc Pattyn23-Apr-09 5:12 
AnswerRe: Deploying custom fonts at Client Place Pin
Paddy Boyd23-Apr-09 6:34
Paddy Boyd23-Apr-09 6:34 
GeneralRe: Deploying custom fonts at Client Place Pin
ramz_g23-Apr-09 7:53
ramz_g23-Apr-09 7:53 
QuestionC# and Outlook Pin
thehacker21323-Apr-09 2:53
thehacker21323-Apr-09 2:53 
Question[Message Deleted] Pin
DJ24523-Apr-09 2:21
DJ24523-Apr-09 2:21 
AnswerRe: Create GanttChart Pin
musefan23-Apr-09 2:45
musefan23-Apr-09 2:45 
AnswerRe: Create GanttChart Pin
paas23-Apr-09 3:12
paas23-Apr-09 3:12 
AnswerRe: Create GanttChart Pin
Christian Graus23-Apr-09 10:23
protectorChristian Graus23-Apr-09 10:23 
QuestionHttpPostedFileBase and locking... Pin
daviiie23-Apr-09 2:17
daviiie23-Apr-09 2:17 

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.