A simple example is a function I want to create.
private void drawRectangle(int x, int y)
I send coordinates and it draws a rectangle with some particularities. That function will be in at least two forms. What do you do to make that function reusable and prevent from writing it in two places?
Thank you!
For WinForms, pass the Graphics object to your method:
Then draw the rectangle to the Graphics object.