XNA Class library

89 views Asked by At

Seems a simple task but despite google and looking at all the menus I cannot find how to look at documentation of classes or objects in XNA.

In unity you just press ctrl and ' what is is in visual c#/XNA? I am looking for information on created classes/Objects not the online documentation/Help.

2

There are 2 answers

1
user3256944 salutes Monica On

You can search the MSDN for the required information. For example, here is a link for the SpriteBatch class.

The MSDN is not just limited to XNA, it is a useful tool for all Microsoft based languages.

Please note that some of the XNA documentation is not very informative. I've come across pages on XNA functionality that contain only one or two lines - no example code either!

What about classes that people have created and documented?

The author of the code will need to provide documentation in the code. Here is an example:

/// <summary>
/// This is an example of XML documentation for a class.
/// </summary>
class Program
{
    /// <summary>
    /// This is an example of XML documentation for a public method.
    /// </summary>
    /// <param name="name">The name we are validating.</param>
    /// <returns>True if valid, otherwise false.</returns>
    public bool IsValid(string name)
    {
        return true;
    }
}

Visual Studio will automatically generate most of the XML for you. Just type "///" above the class/method to begin. You can read more on it here.

You will now be able to view the code documentation by hovering over the class/function name.

0
Milodin On

To anyone who might get this problem in the future - I have solved it.

The files are .chm files and are located in the folder of the classes when available.

Another issue when you are downloading them from another computer to be aware of is they are sometimes blocked.

If that is the case - right click them/properties/general and in the lower right corner there is a button (Unblock) click this, reload the .chm file and all should be readable.

So glad I found this I was starting to question my sanity and it appeared no one else was aware of them or at least understood my problem.