Visual Studio Macro - Code Gen Language


I am writing a macro for Visual studio that will generate some code.

I would like for the macro to generate for both C# and VB, is there a way to determine what language is being used in the active (current) document?


I just located a bit of code, it seems that it's a hidden property:

DTE.ActiveDocument.Language = "CSharp"

This is not quite your question, but I wouldn't recommend using HABTM anymore. You should create a join model and use has_many :through. (In your case you'd create a new model called ExpenseCategoryAssignment, or something)

The problem is that HABTM creates ambiguities that rails doesn't like, and it tends to expose bugs you wouldn't see otherwise.

This video can help you solving your question :)
By: admin