I LOVE C#

Eyal Vardi

Experts4D

  • Eyal Vard

Firefox Extensions

Post News

<hr color="#000000"><br>Hello, word ! DTE

using System;
using EnvDTE;

namespace CodeDom
{
 class Class1
 {
   static EnvDTE.Solution sol;
   static EnvDTE.DTE dte;

  [STAThread]
  static void Main(string[] args)
  {   
   dte = (EnvDTE.DTE) 
System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.7.1");
   sol = dte.Solution;
   CodeDomDemo1();
  }

  static void CodeDomDemo1()
  {
   foreach( EnvDTE.Project pro in sol.Projects)
    foreach( EnvDTE.ProjectItem item in pro.ProjectItems)
    {
     foreach( EnvDTE.CodeElement elm in item.FileCodeModel.CodeElements )
     {
      if( elm.Kind   == vsCMElement.vsCMElementNamespace )
      {
       EnvDTE.CodeNamespace ns = (CodeNamespace)elm;
       ns.AddClass( HelloWord ,null,null,null,EnvDTE.vsCMAccess.vsCMAccessPublic);
      }
     }
    }
  }
 }
}


Comments

TrackBack said:

^_^,Pretty Good!
# April 10, 2005 7:19 AM

br hello said:

Pingback from  br hello

# June 14, 2008 9:29 AM

Nolan said:

How are you. If your daily life seems poor, do not blame it; blame yourself, tell yourself that you are not poet enough to call forth its riches. Help me! It has to find sites on the: Hair extension cheap sale. I found only this - <a href="www.hitlab.org/.../CheapHairExtensions">where to buy cheap hair extensions</a>. The break about the captive hair of local participants is sophisticated, cheap hair extensions. Cheap hair extensions, not, the positive hair is sometimes hired into your various and you can write them or penalize them at your vocal &quot. THX ;-), Nolan from Malawi.

# March 21, 2010 10:59 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)