Does C# method take memory?

后端 未结 2 1727
南方客
南方客 2021-01-19 14:28

What happens in memory when there is a class with 50 methods and we create 50 object instances of that class? What is the best solution for having an object wit

2条回答
  •  情歌与酒
    2021-01-19 14:47

    Firstly the memory usage and functionality is not based on the object, its based on the class of which we are making an object... hence if you are making a object of a class you are able to access all the functionality of that class.. and according to me its a better option to use a object for accessing a class functionality

提交回复
热议问题