What are the uses of “using” in C#?

后端 未结 29 2886
有刺的猬
有刺的猬 2020-11-21 07:31

User kokos answered the wonderful Hidden Features of C# question by mentioning the using keyword. Can you elaborate on that? What are the uses of

29条回答
  •  别跟我提以往
    2020-11-21 08:05

    For me the name "using" is a little bit confusing, because is can be a directive to import a Namespace or a statement (like the one discussed here) for error handling.

    A different name for error handling would've been nice, and maybe a somehow more obvious one.

提交回复
热议问题