Author Topic: Problem with Tools->Beautify, C#  (Read 1572 times)

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Problem with Tools->Beautify, C#
« on: August 20, 2009, 02:14:44 pm »
SlickEdit Version 14.0.2.2    Build Date: July 08, 2009    Emulation: Vim
OS: Windows XP    Version: 5.01.2600  Service Pack 3   
Project Type:
Language: *.cs (C#)
Hotfixes:
C:\...\14.0.2\hotfixes\hotfix_loader_se1402.zip (Revision: 1)
C:\...\14.0.2\hotfixes\hotfix_se1402_cumulative.zip (Revision: 11)

Don't know if it is the LINQ query syntax, or the anonymous type, but Tools->Beautify... produces an error:
"11: Unexpected right brace, possible missing ;"

Code: [Select]
public partial class DirUtil
{
    public void DoIt()
    {
        // Query the set of files
        var fileTemplateQuery = from FileInfo f in 
            new DirectoryInfo(@"C:\temp").GetFiles("*.*", SearchOption.AllDirectories) 
             where f.Extension.ToLower() == ".xml" || 
                   f.Extension.ToLower() == ".txt" 
             select new  { 
                DateLastModified = f.LastWriteTime, 
                Extension = f.Extension, 
                Size = f.Length, 
                FileName = f.Name 
             };
             
        foreach (var f in fileTemplateQuery.OrderBy(file =>
                                            file.DateLastModified)) {
            Debug.WriteLine(f.FileName);
        }
    }
}