Click to See Complete Forum and Search --> : [RESOLVED] Create online doc
vbbit
Mar 30th, 2006, 02:01 AM
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?
// 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();
}
}
jmcilhinney
Mar 30th, 2006, 02:10 AM
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.
vbbit
Mar 30th, 2006, 02:26 AM
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?
jmcilhinney
Mar 30th, 2006, 02:33 AM
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.
vbbit
Mar 30th, 2006, 02:38 AM
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.
jmcilhinney
Mar 30th, 2006, 02:49 AM
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.
vbbit
Mar 30th, 2006, 02:58 AM
Kool... see, I learn new thing. Thank you!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.