Results 1 to 7 of 7

Thread: [RESOLVED] Create online doc

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Resolved [RESOLVED] Create online doc

    I don't know what does this program do? Does it generate an XML file or no? If yes, where can I find that xml doc?

    Code:
    // This is just a comment
    using System;
    
    ///<summary> class test has only one method</summary>
    ///
    class Test
    {
        ///<summary> string z contains identifier to output</summary>
        ///
        private static string z = "Hello";
        ///<summary> method Main is an entry point of the program</summary>
        ///
        public static void Main()
        {
            Console.WriteLine(z);
            Console.ReadLine();
        }
    }

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Create online doc

    Have you tried running it? It's a commandline app. It writes the contents of the 'z' variable to the console and then waits for the user to press Enter. There's no file and there's definitely no XML. I'm not sure where you got that idea from as it is completely unrelated. You can find out what a method, e.g. WriteLine and ReadLine, does by clicking it and pressing F1 to open the help topic for it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: Create online doc

    I got that idea from this website http://csharpcomputing.com/Tutorials/Lesson11.htm
    would the poster mean like you said or there indeed is an xml file?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Create online doc

    Ah, sorry. Stupid me. I didn't notice that you were using the XML comments. You get so used to syntax highlighting that when everything is the same colour you can miss things too easily. I thought you meant the actual C# code was supposed to be creating an XML file. When you build that project it will indeed create an XML documentation file in the same folder as the executable. You really shouldn't worry about that at the moment though. It's not going to do you much good to read the file. What it does is provide a source for Intellisense. The information about you see about methods, properties, arguments, etc. in Intellisense tooltips comes from those files. I really wouldn't worry too much about creating your own XML documentation at this point. The C# code is just a bit more important.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: Create online doc

    Thank you.. but I cannot find the xml file. I am using the Visual Studio 2005 and when I clicked run... it prints "Hello" on the console, but no xml file in the folder. Can you tell me why? I know this might not be important based on your experience, but it is worth to know.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Create online doc

    It's not created by default. You need to go to the Build tab and check the "XML documentation file" option. If you don't provide a name it will just use the same name as the executable. The following screenshot is for C# 2005 Express (.NET 2.0). You've never specified which version you're using. Please use the radio buttons provided when you create a new thread so we know as the solutions may be different for different versions.
    Attached Images Attached Images  
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: Create online doc

    Kool... see, I learn new thing. Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width