C# 4 Keywords Added to CodeFormatter

Topics: Controls
Jun 14, 2009 at 10:23 PM

I've been blogging about C# 4 features recently so I updated the keywords in App_Code/Extensions/CodeFormatter/CSharpFormatter.cs as follows:

protected override string Keywords 
{
    get 
    {
        // updated on 14 June 2009 by W. Kevin Hazzard for C# 4 per:
        // http://msdn.microsoft.com/en-us/library/x53a06bb(VS.100).aspx
        return "abstract as base bool break byte case catch char "
        + "checked class const continue decimal default delegate do "
        + "double dynamic else enum event explicit extern false "
        + "finally fixed float for foreach from get goto group if "
        + "implicit in int interface internal into is join let lock "
        + "long namespace new null object operator orderby out "
        + "override partial params private protected public readonly "
        + "ref return sbyte sealed select set short sizeof stackalloc "
        + "static string struct switch this throw true try typeof "
        + "uint ulong unchecked unsafe ushort using value var virtual "
        + "void volatile where while yield";
    }
}

You may want to do the same. Hopefully, Al or Mads will make a change to the source code base, too. Enjoy.