当前位置:网站首页>C enum contains value - C enum contains value
C enum contains value - C enum contains value
2022-07-03 18:44:00 【fyin1314】
problem :
I have an enum I have an enumeration
enum myEnum2 { ab, st, top, under, below}I would like to write a function to test if a given value is included in myEnum I want to write a function to test myEnum Whether the given value is included in
something like that: Something similar :
private bool EnumContainValue(Enum myEnum, string myValue){ return Enum.GetValues(typeof(myEnum)) .ToString().ToUpper().Contains(myValue.ToUpper()); }But it doesn't work because myEnum parameter is not recognized. But it doesn't work , Because I can't recognize myEnum Parameters .
Solution :
Reference resources : https://stackoom.com/en/question/tadR边栏推荐
- Briefly describe the quantitative analysis system of services
- After nohup NPM start &, close the shell window directly, and the process closes accordingly
- Zhengda futures news: soaring oil prices may continue to push up global inflation
- Pan for in-depth understanding of the attention mechanism in CV
- NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线
- 变化是永恒的主题
- Add control at the top of compose lazycolumn
- Read the paper glodyne global topology preserving dynamic network embedding
- Golang string (string) and byte array ([]byte) are converted to each other
- 2022-2028 global scar care product industry research and trend analysis report
猜你喜欢

How to analyze the rising and falling rules of London gold trend chart

Computer graduation design PHP makeup sales Beauty shopping mall

2022-2028 global solid phase extraction column industry research and trend analysis report

2022-2028 global marking ink industry research and trend analysis report

English語法_名詞 - 分類

leetcode:11. 盛最多水的容器【双指针 + 贪心 + 去除最短板】
![[combinatorics] dislocation problem (recursive formula | general term formula | derivation process)*](/img/e8/67961bf8a589869bde2a0aa3e09605.jpg)
[combinatorics] dislocation problem (recursive formula | general term formula | derivation process)*
![235. The nearest common ancestor of the binary search tree [LCA template + same search path]](/img/f5/f2d244e7f19e9ddeebf070a1d06dce.png)
235. The nearest common ancestor of the binary search tree [LCA template + same search path]

Have you learned the correct expression posture of programmers on Valentine's day?

2022-2028 global petroleum pipe joint industry research and trend analysis report
随机推荐
Briefly describe the quantitative analysis system of services
How does GCN use large convolution instead of small convolution? (the explanation of the paper includes super detailed notes + Chinese English comparison + pictures)
204. Count prime
Install apache+php+mysql+phpmyadmin xampp and its error resolution
SQL injection -day16
简述服务量化分析体系
What is SQL get connection
Typescript configuration
Use of unsafe class
Usage of laravel conditional array in
Change is the eternal theme
CTO and programmer were both sentenced for losing control of the crawler
199. Right view of binary tree - breadth search
Mature port AI ceaspectus leads the world in the application of AI in terminals, CIMC Feitong advanced products go global, smart terminals, intelligent ports, intelligent terminals
Unsafe类的使用
Torch learning notes (1) -- 19 common ways to create tensor
4. Load balancing and dynamic static separation
Kratos微服务框架下实现CQRS架构模式
Torch learning notes (7) -- take lenet as an example for dataload operation (detailed explanation + reserve knowledge supplement)
Change the single node of Postgres database into master-slave