Login | Sign Up
ErrorKey - Search engine for Error codes and messages     
  C# .Net:Visual Basic .Net Compiler Messages  [ 3 result(s) ]
MICROSOFT 
 BC31429  -  '' is ambiguous because multiple kinds of members with this name exist in ''  MICROSOFT
An expression accesses a programming element defined in a class, structure, module, or interface that contains more than one member with the same name. The most likely cause of this error is case sensitivity. Visual Basic names are case-insensitive, which means you can capitalize them differently at different places in your code. For example, if you define a variable with the name XYZ and later access it as xyz, the compiler considers the two names to be equivalent. However, other languages, such as Visual C# and Visual C++, are case-sensitive. In such a language, XYZ and xyz are not considered to be the same name. Therefore, a class written in such a language could define a variable named XYZ and a property named xyz. The common language runtime (CLR) preserves case sensitivity in assemblies. However, if a Visual Basic application accesses an assembly with names XYZ and xyz, they appear as the same name.
If you have control over the source code of the defining type, consider renaming the members so that they differ by more than only casing. This might not be possible if the defining type has already been published and is being used by other applications. If you cannot rename the members in the defining type, remove the cited programming element from your code. You cannot access an element that appears to Visual Basic to have multiple definitions.
Visual Basic .Net Compiler Messages
Comments
 
 BC31422  -  'System.Void' can only be used in a GetType expression  MICROSOFT
An expression in an assignment statement or a declaration uses Void as the type of a variable, procedure parameter, function return, or type argument. The Void structure is a specialized type used internally by the .NET Framework and particularly by Visual C# and Visual C++. It represents a return value type for a method that does not return a value. Visual Basic uses a Sub procedure when a value is not returned and a Function procedure when a value is returned. You can test a reference variable with the GetType Operator operator to see if its run-time type is Void, but you cannot use Void in any other context.
If you want to compare the run-time type of a variable to Void, use the GetType operator. Unless you have a particular reason to compare a run-time type to Void, remove the reference to it altogether.
Visual Basic .Net Compiler Messages
Comments
 
 BC31428  -  Arrays of type 'System.Void' are not allowed in this expression  MICROSOFT
An expression in an assignment statement or a declaration specifies an array of type Void. The Void structure is a specialized type used internally by the .NET Framework and particularly by Visual C# and Visual C++. It represents a return value type for a method that does not return a value. Visual Basic uses a Sub procedure when a value is not returned and a Function procedure when a value is returned. Arrays of type Void are not meaningful and are not allowed in any context.
Remove the parentheses that designate an array. Unless you have a particular reason to compare a run-time type to Void, remove the reference to it altogether.
Visual Basic .Net Compiler Messages
Comments
 
 

 
Visual Basic .Net Compiler Messages (3)