ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods
Conveniently produces a exception from a given string.
public static class StringExtensions { public static void ToException (this string message) { throw new Exception(message); } }
"ExceptionText".ToException();
Author: MrMostInteresting
Submitted on: 6 mrt. 2015
Language: C#
Type: String
Views: 5259