Ajeet Mishra
Which Data Type can Not be Used in switch Case Statement ?
By Ajeet Mishra in .NET on Sep 14 2015
  • Mukesh Kumar
    Sep, 2017 3

    float

    • 0
  • Ajeet Mishra
    Sep, 2015 14

    The governing type of a switch statement is established by the switch expression. If the type of the switch expression is sbyte, byte, short, ushort, int, uint, long, ulong, char, string, or an enum-type, then that is the governing type of the switch statement. Otherwise, exactly one user-defined implicit conversion (ยง13.4) must exist from the type of the switch expression to one of the following possible governing types: sbyte, byte, short, ushort, int, uint, long, ulong, char, string. If no such implicit conversion exists, or if more than one such implicit conversion exists, a compile-time error occurs.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS