Summary of code for vb.net?

Sam Marrocco

Newcomer
Joined
Jan 18, 2004
Messages
3
Any free utilties for giving summaries of vb.net projects? Things like number of comments lines, total number of lines, procedures, etc....?
 
A different tool to open the archive? It worked fine for me just now.

Thanks. I tried downloading it with Firefox and it worked OK. But I get the feeling it's going to take a lot of time to get it up and running. When I try to build (which I think I have to do to be able to register the add-in) I get messages "Cannot implicitly convert type object to Microsoft.Office.Core.CommandBarControl." An explicit conversion exists (are you missing a cast?)."

I'm sure I could figure it out, but knowing how many lines are in my code is not that high a priority...
 
Actually, although I don't understand C#, the offending lines look pretty straightforward. One reads

Code:
_CommandBars commandBars = applicationObject.CommandBars;

And the other is pretty similar. I think I just need to know how to do a cast (the equivalent of CType) in C#, or to turn Option Strict off in this project. In VB you can select this on the Compile tab of the project properties, but I can't see anything similar in this (C#) project. Can anyone tell me what I should be doing?
 
Last edited:
C# doesn't have the ability to turn of type checking, a cast is performed by putting the desired type in parenthesis before the type to be casted. e.g.
Visual Basic:
Dim b as Button = DirectCast(sender, Button)
in c# would be
C#:
Button b = (Button) sender;
 
Thanks, it compiles now. But it compiles to a dll whereas an existing add-in that I have is a "Visual Studio Add-in Definition File" in My Documents/Visual Studio 2005/Add-ins. I can copy the dll into this folder, but it doesn't show up in the Add-in Manager. Any thoughts?
 
Back
Top