title: DTE2 _applicationObject reading filename in folder
body: <p>below is the current codes  i have.
  what it does is basically loop thru project solution project file and detect if it is a C# file. however it can't detect files that are put in a folder , how can i modify it to read a C# file in a solution folder. </p>
  
  <p>Regards , Andy</p>
  
  <pre><code>  foreach (var projectItem in
              _applicationObject.Solution.Projects.Cast&lt;Project&gt;().SelectMany(project =&gt; project.ProjectItems.Cast&lt;ProjectItem&gt;()))
          {
              //for (var i = 0; i &lt; projectItem.FileCount; i++)
              //{
  
  
              if (projectItem.FileCount &gt; 0 &amp;&amp; projectItem.Name.EndsWith(".cs")) // check if project is .Cs files
              {
                  string fileName;
                  try
                  {
  
                      fileName = projectItem.FileNames[0];
                  }
                  catch (Exception)
                  {
                      continue;
                  }
                  //end of find filename
  
              }
  
  
          }
  </code></pre>