Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66784

Re: Running code from btn_Click event on custom form

$
0
0

Good programming practice isolates components as much as possible and defines clear and minimal interfaces between them.

  

You should read up on that.

  

Therefore, I would advise against defining global and static variables as much as possible (and it is mostly easy to avoid them).

  

Try passing the required data in and out of methods via arguments and return values, or encapsulate data together with the associated functionality processing it into its own dedicated little class.

 

That is one of the paradigms of object-oriented programming, aka OO.

 

Here is the first thing that came up performing an Internet search for "OO .NET":

 

https://duckduckgo.com/?q=oo+.net

 

https://www.c-sharpcorner.com/UploadFile/84c85b/object-oriented-programming-using-C-Sharp-net/

 

Cheers,

 

Jeremy

 


Viewing all articles
Browse latest Browse all 66784

Trending Articles