FxCop Is It As Valuable On .NET As It Is On C#?
Mar 23, 2009
I have been looking at a few of our VB.NET dll's using FxCop and all of the errors relate to DLL setup (i.e. Strong Names, Culture Info) and the case of Variables methods. Looking at a few examples of FxCop examining a C# Dll, it appears to offer a lot more potential errors.
Does this mean that FxCop is more valuable on C# developments that VB.NET or have I just chosen bad examples.
I thought it was the case that FxCop worked on IL rather than the specific languages, so am I just missing rules files for VB.NET or are there more available for C#?
View 3 Replies
Nov 1, 2010
I have a simple question (I am sure) but I could not find out how I should resolve. Here it is: In my form I have a label which gets its text by databindings.add method. Here is the code I have.
lblCOPPrice.DataBindings.Add("Text", dtCOPPrice, lstCOP.GetItemText(lstCOP.SelectedItem).Replace(" ", "_"))
What I would like to do is to use this text of this label (lblCOPPrice) as the value of my variable in a module. I simply wanted to do this as the below code but what I get is the initial text of this control.
copprice = lblCOPPrice.Text
I know that I should use in the code something like lblCOPPrice.databindings and someting but what is it?
View 1 Replies
May 27, 2010
If we won't know what Exception will be thrown then why cannot we catch a general exception? I just cannot follow this and some more.
View 14 Replies
Dec 11, 2009
I'm starting a new project; trying to be more strict than previous ones. I've set warnings as errors in the build I've added FxCop to PostBuild. The one last thing on my list os require people to add inline docs for all classes/non-private methods/properties.
View 2 Replies
Nov 14, 2009
For example:Public Event CurrentChanged As EventHandler(Of CurrentChangedEventArgs(Of T))Shows the message "Do not nest generic types in member signatures." on CurrentChangedEvent, which is the variable that holds the delegate for the event, and VB generates it automagically.How do I suppress the rule for the item?
View 1 Replies
Apr 22, 2010
On one side, in Vb.Net when you add an event handler to an object the created method is named: <NameOfTheObject>_<NameOfTheMethod>.As I like to have consistent syntax I always follow this rule when creating event handlers by hand.On the other side when I create private variables I prefix them with m_ as this is a common thing used by the community, in C# people use to put _ at the beginning of a variable but this is no CLS compliant.
View 1 Replies
Jun 8, 2012
I have a class that looks like the following:
Public Class Utilities
Public Shared Function blah(userCode As String) As String
'doing some stuff
End Function
End Class
I'm running FxCop 10 on it and it says:"Because type 'Utilities' contains only 'static' Shared' in Visual Basic) members, add a default private constructor to prevent the compiler from adding a default public constructor."
[Code]...
View 1 Replies