“Global variable” in Visual C#

前端 未结 5 1176
眼角桃花
眼角桃花 2021-01-23 21:26

I have made the Graph class, and i want to simulate a distribution network. The Graph works 100%. But, i want to use that same struct/class in all my application! For example: I

5条回答
  •  再見小時候
    2021-01-23 21:29

    Make your Graph instance a public static member of a static class and for all practical purposes you have your global.

提交回复
热议问题