|
|
@ -16,10 +16,7 @@ |
|
|
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
// DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
#nullable enable |
|
|
|
|
|
|
|
using System; |
|
|
|
using System.Diagnostics.CodeAnalysis; |
|
|
|
|
|
|
|
namespace ICSharpCode.Decompiler.Util |
|
|
|
{ |
|
|
@ -37,8 +34,7 @@ namespace ICSharpCode.Decompiler.Util |
|
|
|
/// </summary>
|
|
|
|
/// <exception cref="OverflowException">Overflow checking is enabled and an overflow occurred.</exception>
|
|
|
|
/// <exception cref="InvalidCastException">The cast is invalid, e.g. casting a boolean to an integer.</exception>
|
|
|
|
[return: NotNullIfNotNull("input")] |
|
|
|
public static object? Cast(TypeCode targetType, object? input, bool checkForOverflow) |
|
|
|
public static object Cast(TypeCode targetType, object input, bool checkForOverflow) |
|
|
|
{ |
|
|
|
if (input == null) |
|
|
|
return null; |
|
|
|