views:

79

answers:

3

My teacher has asked me to write a program in C# to handle "Array type mismatch exception". But i couldn't find anything in the net related to that. I just want to confirm if there exists something like that.

A: 

Yes, it is an exception class:

Mismatch match exception

Kevin
+3  A: 

ArrayTypeMismatchException on MSDN

Phil Devaney
+1  A: 

As cited in ArrayTypeMismatchException Class on MSDN:

ArrayTypeMismatchException is thrown when the system cannot convert the element to the type declared for the array. For example, an element of type String cannot be stored in an Int32 array because conversion between these types is not supported. It is generally unnecessary for applications to throw this exception.

Use above link for example.

ventr1s