Categories: Uncategorized

OOP Add two numbers using C#.net

In this tutorials will  teach you how to add two number using OOP concepts. This is an important for developing a c# projects.  there are many students who struggling with this area. so that I bring this article for all to clear the doubts.

First You have to Design the Form

After that you have to create the class  Cal.cs

   class Cal
    {
        public int num1, num2,tot;
        public int Add()
        {
            tot = num1 + num2;
            return tot;
        }
    }

Paste the Code inside the Add Button

admin

Recent Posts

Java Beans

A Java Bean is a reusable software component that follows a specific set of conventions.…

3 days ago

Java String Methods

Java provides a rich set of built-in methods for handling String operations efficiently. Since strings…

3 days ago

Java Developer Jobs

Java remains one of the most in-demand programming languages worldwide, powering everything from enterprise applications…

3 days ago

Converting Integer to String in Java

Java provides multiple ways to convert an integer (int) to a string (String). Whether you're…

3 days ago

JSP to JSP Communication: A Complete Guide to Dynamic Java Web Development

Java Server Pages (JSP) is a powerful technology used to develop dynamic web applications by…

1 week ago

Which Frontend Framework to Use with Spring Boot?

Spring Boot is a powerful backend framework for developing Java-based web applications. Pairing it with…

1 week ago