Categories
c++ Visual Studio Template XNA

XNA C# Item Class Template

I thought I would share a simple class template for XNA classes that are not Game Components (for classes that do not require an update etc.). If you copy the code below to a new (empty class called Class1.cs) and then go to File->Export Template (choose Item Template in the wizard) and the class you copied the template info to. After restarting Visual Studio you can now use the template ( Add->New Item-> My Templates).

//-----------------------------------------------------------------------
// Copyright (c) "$safeitemname$". All rights reserved.
// $guid1$
// $username$$time$
// 
// $safeitemname$ : 
// 
//-----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace XNAGame
{
    class Class1
    {
    }
}

The above “code” is free and can be modified, updated and used without consent.

Bye for now,
Michael Hubbard
https://michaelhubbard.ca

Leave a Reply

Your email address will not be published.