C# Exercise: Creating methods for reuse between different C# apps (Winforms, Console app) - Part 1

Опубликовано: 10 Март 2026
на канале: Coding Homework
2,006
8

C# Exercise: Creating methods for reuse between different C# apps (Winforms, Console app) - Part 1

After a short introduction to the project, we start coding our first method to calculate the power of a number the user enters using winforms. We will use C# recursion to accomplish this task.

In this exercise we will create a reusable class that calculates power of a number the user enters, and also displays list of prime numbers. We will use C# winforms combine with C# console program.
We'll practice techniques such as C# recursion, populating winform controls, checking user input with try-catch, loops, if statements and more. We will make sure our methods are reusable across different C# apps (winforms and console apps).

Learning to code? Follow my C# tutorials for beginners. I do a lot of C# programming challenges and C# projects as part of my homework - every day!
If you are learning to program, nothing beats solving real programming exercises and coding challenges.
So don't forget to subscribe, as I release several programming videos every week!

DOWNLOAD SOURCE CODE: http://www.codinghomework.com/?p=878