Calling a function in the Form Class from another Class, C# .NET

前端 未结 5 597
悲&欢浪女
悲&欢浪女 2020-12-28 21:28

Can someone please let me know by some code how I can call a function located in the Form class from another class?

Some code will be of great help!

thanks

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-28 21:58

    If the method is not related to the UI, an from your example i understand that it's not, you can create another class that will contain this method and then use it in your Form class and in any other places where you want to use it.

提交回复
热议问题