What is the difference between a static variable in C++ vs. C#?

后端 未结 3 1402
再見小時候
再見小時候 2021-01-17 23:24

Do static variables have the same or similar functionality in C# as they do in C++?

Edit:

With C++ you can use static variables in many different contexts -

3条回答
  •  猫巷女王i
    2021-01-18 00:02

    From MSDN: The static keyword: In C++, static can be used both to declare class-level entities and to declare types that are specific to a module. In C#, static is only used to declare class-level entities.

提交回复
热议问题