in C #, is it possible to declare Enum, which is only displayed inside the function, where will I use it?
Enumerations have the same rules as classes. You cannot declare them inside a function, although you can declare them private to a class:
public class Foo { private enum Bar { A, B, C } }
No. An enumeration must be declared in a namespace or class, so it will always have scope outside the function itself.
With the help classyou can do. I do not think that you can make it visible only for a specific one function.
class
function
Source: https://habr.com/ru/post/1776381/More articles:db for dynamic multilingual data structure - language-agnosticMulticast in LaTeX - latexZune as dev / test for WP7 applications - windows-phone-7WCF Service - Minimum required web.config? - web-configWhat is the best server to host a Haskell web page (HSP)? - webserverКак использовать стандартную проверку ASP.NET MVC 3 со стандартным провайдером членства? - jqueryHow to find column name in MySQL? - mysqlPassing a List of Enumerated Criteria - grailsRunning something In a feedback thread - multithreadingGet my public IP address using netcat - publicAll Articles