source/R5T.NetStandard.Types/Code/Helpers/ExceptionHelper.cs
/// <summary>
/// Provides a message indicating that an object could not be cast to an expected type.
/// </summary>
Provides a message indicating that an object could not be cast to an expected type.
Provides a message indicating that an object could not be cast to an expected type .
public static string InvalidCastExceptionMessage(Type expectedType, object obj)
        {
            var output = $"Invalid cast. Allowed: {expectedType}, found: {obj.GetType().FullName}";
            return output;
        }
public static string InvalidCastExceptionMessage ( Type expectedType , object obj ) { var output = $" Invalid cast. Allowed:  { expectedType } , found:  { obj . GetType ( ) . FullName } " ; return output ; }
Provides a message indicating that an object could not be cast to an expected type.
Provides a message indicating that an object could not be cast to an expected type .
expectedType
Type
obj
object