Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Argument 'argument' cannot convert from TypeA to TypeB
The type of one argument in a method does not match the type that was passed when the class was instantiated.
The following sample generates CS1503:
namespace x
{
public class a
{
public a(char i)
// try the following constructor instead
// public a(int i)
{
}
public static void Main()
{
a aa = new a(2222); // CS1503
}
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.