Executing Code in a Class

I am in a beginning C# programming class and all the programs we have designed have had the program run in the class attached to the main windows form but I want to put some code in a class that is separate.

I created a class that I want to be created when instantiated and run some code and then edit its variables so that the main program can call those variables back. But in the class no code is writable outside of a getter or setter, I can't create a method or call one or even use a variable that I have created. Can someone talk me through whats going on? Obviously I am a beginner and also a 1st year computer science student.

Thank you

by Andykatz14 via /r/csharp

Leave a Reply