Useful XNA Framework tips

Last post 11-20-2007, 6:26 AM by TeaBean. 26 replies.
Page 2 of 2 (27 items)   < Previous 1 2
Sort Posts: Previous Next
  •  11-10-2007, 11:02 AM

    Useful XNA Framework tips

    Whenever i start a new codefile, alot of the time i find myself haveing to add all the xna refrences at the top, so i realised this would make an exilent snippit

    save the following xml as usingXNA.snippet

    - <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    - <CodeSnippet Format="1.0.0">
    - <Header>
      <Title>XNA Using statments</Title>
      <Author>NekoCake Industries</Author>
      <Description>Inserts all the using statments needed for good xna useage</Description>
      <HelpUrl>www.nekocake.com</HelpUrl>
    - <SnippetTypes>
      <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Shortcut>UsingXNA</Shortcut>
      </Header>
    - <Snippet>
    - <Code Language="CSharp">
    <![CDATA[
    #region Using Statements
    using System;
    using System.Collections.Generic;
    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Audio;
    using Microsoft.Xna.Framework.Content;
    using Microsoft.Xna.Framework.Graphics;
    using Microsoft.Xna.Framework.Input;
    using Microsoft.Xna.Framework.Storage;
    #endregion
      ]]> f(clean);
      </Code>
      </Snippet>
      </CodeSnippet>
      </CodeSnippets>
     
    Then start up GSE, click tools -> code snippet manager -> add then find where you saved the xml, and load it in. whenever you need the xna refences, just type UsingXNA and press tab twice when intelesence picks it up!

    NekoCake NotePad
  •  11-20-2007, 6:26 AM

    Re: Useful XNA Framework tips

    I forget who mentioned it but someone said something about String.ToLower() being very ineffecient.

    Is this because the String object in c# is immutable? I know this is the case with Java so doing a toLower() will create a new String object. Is this the case in c# and the reason why this would be an inefficient thing to do in a tight loop or something? Not to mention also meaning the old String object has to be GC at some point?
Page 2 of 2 (27 items)   < Previous 1 2
View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback