Send comments on this topic. |
|
Glossary Item Box
Cause
Rule Description
A violation also occurs when any of these types are represented in the code using the full namespace for the type: System.Array, System.Boolean, System.Byte, System.Char, System.Decimal, System.Double, System.Int16, System.Int32, System.Int64, System.Object, System.SByte, System.Single, System.String, System.UInt16, System.UInt32, System.UInt64.
Rather than using the type name or the fully-qualified type name, the built-in aliases for these types should always be used: array, bool, byte, char, decimal, double, short, int, long, object, sbyte, single, string, ushort, uint, ulong.
The following table lists each of these types in all three formats:
Type Alias |
Type |
Fully Qualified Type |
array |
Array |
System.Array |
bool |
Boolean |
System.Boolean |
byte |
Byte |
System.Byte |
char |
Char |
System.Char |
decimal |
Decimal |
System.Decimal |
double |
Double |
System.Double |
short |
Int16 |
System.Int16 |
int |
Int32 |
System.Int32 |
long |
Int64 |
System.Int64 |
object |
Object |
System.Object |
sbyte |
SByte |
System.SByte |
single |
Single |
System.Single |
string |
String |
System.String |
ushort |
UInt16 |
System.UInt16 |
uint |
UInt32 |
System.UInt32 |
ulong |
UInt64 |
System.UInt64 |
How to Fix Violations
© Microsoft Corporation. All Rights Reserved.