Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

enum element count C#

var count1 = typeof(TestEnum).GetFields().Length;
var count2 = Enum.GetNames(typeof(TestEnum)).Length;
var count3 = Enum.GetValues(typeof(TestEnum)).Length;
Comment

PREVIOUS NEXT
Code Example
Csharp :: How to create connection string dynamically in C# 
Csharp :: wpf richtextbox clear text 
Csharp :: how to split concat string c# 
Csharp :: httpclient soap request c# 
Csharp :: c# how to write an array in a single line 
Csharp :: decalre an int list mvc 
Csharp :: how to say hello world in c# 
Csharp :: c# get pressed key 
Csharp :: keybyvalue c# 
Csharp :: c# double to string with dot 
Csharp :: how to clone somthing unity 
Csharp :: unity RemoveComponent 
Csharp :: how to store array in c# 
Csharp :: unity debug c# code with console 
Csharp :: how to set unique constraint from EF core 
Csharp :: how to close an application in c# 
Csharp :: c# string tob64 
Csharp :: c# get array subarray 
Csharp :: rotate player unity 
Csharp :: byte to binary c# 
Csharp :: assign color to value in c# 
Csharp :: change dot net core web api routing 
Csharp :: get attribute value of xml element c# 
Csharp :: unity call function on animation onstateexit 
Csharp :: unity string lowercase 
Csharp :: c# get all enum values 
Csharp :: c# serial port 
Csharp :: how to set a transform equal to something unity 
Csharp :: datetimeoffset to datetime c# 
Csharp :: Customize yup number 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =