Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# accept any enum

public static void MyFunction<T>(T en) where T: IComparable, IFormattable, IConvertible
{
    if (!typeof(T).IsEnum)
        throw new ArgumentException("en must be enum type");
    // implementation
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: nullable IList to List 
Csharp :: mesh decimate pyvista 
Csharp :: Xamarin forms XAML change value 
Csharp :: HOW TO CALL AN EXTENSION METHOD FOR VIEW C# 
Csharp :: #movement speed c 
Csharp :: Working with null values 
Csharp :: how to combine constructors in c# 
Csharp :: c# get innermost exception 
Csharp :: how to add extra window to wpf 
Csharp :: c# UserControl make background transparent 
Csharp :: blazor wasm roles not working 
Csharp :: c# function to validate decimal upto p(25,2) 
Csharp :: c# name script 
Csharp :: process method in scala 
Csharp :: csgo crashes at retrieving game data 
Csharp :: principalcontext c# example 
Csharp :: telerik raddatepicker default date today wpf 
Csharp :: using Tls12 .net 3.5 
Csharp :: c# ile ürün çekme - htmlagilitypack 
Csharp :: c# array of class objects initialization with constructor 
Csharp :: get child index unity 
Csharp :: unity create file name datetime 
Csharp :: scroll two divs simultaneously site:stackoverflow.com 
Csharp :: move dotnet dlls to another folder 
Csharp :: push vaiable in array c# 
Csharp :: Console.WriteLine($"Hello {Ana.ToUpper($)}!"); 
Csharp :: C# walk down a tree and back 
Csharp :: unity shader blend 
Csharp :: ASP.NET Web Forms TextBox 
Csharp :: CS0176 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =