pogi0825
Follower Insights Pro
2
MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1
200 XP
When you are already in a production environment, working 8 hours a day or so, developing applications for clients, you must be aware of guidelines and standards needed to be followed in order to assure that your program is robust and maintainable.
Microsoft FxCop is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines. It uses MSIL parsing, and callgraph analysis to inspect assemblies for more than 200 defects in the following areas:
Library design
Globalization
Naming conventions
Performance
Interoperability and portability
Security
Usage
FxCop is intended for class library developers; however, anyone creating applications that should conform to .NET Framework best practices will benefit. FxCop is also useful as an educational tool for those who are new to the .NET Framework or are unfamiliar with the .NET Framework Design Guidelines.
[inline:fxcop.jpg=Microsoft FX Cop]
Microsoft FX Cop checks Naming Rules for example:
Visual Basic
C#
Microsoft FxCop would complain and instruct you to use Camel Casing for these variables and to avoid abreviation such as "Str" as prefix. To fix this issue, you may change your declarations to something like this:
Visual Basic
C#
For method names and properties, it is advised to use Pascal-Casing, that is capitalizing each letter of each word like:
Visual Basic
C#
Microsoft FXCop also checks for wrong implementations like when checking a string if it is null or empty, some might use this implementation:
C#
OR
C#
Microsoft FXCop recommends using the string.IsNullOrEmpty function to check for empty strings like this:
C#
FXCop still has so many features such as checking for security holes in the code, code performance, localization etc.
To check the full functionalities of Microsoft FXCop, you can download it freely at Microsoft at this address:
Try Microsoft FXCop. It would really change your coding habits.
Happy Coding!
Microsoft FxCop is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines. It uses MSIL parsing, and callgraph analysis to inspect assemblies for more than 200 defects in the following areas:
Library design
Globalization
Naming conventions
Performance
Interoperability and portability
Security
Usage
FxCop is intended for class library developers; however, anyone creating applications that should conform to .NET Framework best practices will benefit. FxCop is also useful as an educational tool for those who are new to the .NET Framework or are unfamiliar with the .NET Framework Design Guidelines.
[inline:fxcop.jpg=Microsoft FX Cop]
Microsoft FX Cop checks Naming Rules for example:
Visual Basic
- Dim
StrWord as
String
C#
- string
StrWord;
Microsoft FxCop would complain and instruct you to use Camel Casing for these variables and to avoid abreviation such as "Str" as prefix. To fix this issue, you may change your declarations to something like this:
Visual Basic
- Dim
wordEntered as
String
C#
- string
wordEntered;
For method names and properties, it is advised to use Pascal-Casing, that is capitalizing each letter of each word like:
Visual Basic
- Public
Property
ProductCode As
String
- ...
C#
- public
string
ProductCode {
- get
{
...
}
- set
{
...
}
- }
Microsoft FXCop also checks for wrong implementations like when checking a string if it is null or empty, some might use this implementation:
C#
- if
(
wordEntered.
Equals
(
string
.
empty
)
)
{
}
OR
C#
- if
(
wordEntered.
Equals
(
""
)
{
}
Microsoft FXCop recommends using the string.IsNullOrEmpty function to check for empty strings like this:
C#
- if
(
string
.
IsNullOrEmpty
(
wordEntered)
)
{
}
FXCop still has so many features such as checking for security holes in the code, code performance, localization etc.
To check the full functionalities of Microsoft FXCop, you can download it freely at Microsoft at this address:
Loading…
www.microsoft.com
Try Microsoft FXCop. It would really change your coding habits.
Happy Coding!