Program for declaration and additions of variables in c#, DOT NET Programming

Program for Declaration and Additions of Variables, I am a learner of C# language and i am struggling with the declaration of variables in C#. Can you have any code examples for this.

Posted Date: 2/11/2013 5:14:34 AM | Location : United States





This is the common problem for almost every new learner of C#. You can understand this code easily, try this.

Program - declaration and additions of variables in c#

using System; 

class DeclareAndDisplay 

      public static void main() 

         { 

             float x; // Declaring x of float type 

             float y; // Declaring y of float type 

             int m;   // Declaring m of integer type 

             x = 75.86F; 

             y = 43.48F; 

             m = x + y; // This line will create an ERROR. Reason given below. 

             Console.WriteLine("m = x + y = 75.86 + 43.48 = " +m); 

         } 

}

Posted by Mike | Posted Date: 2/11/2013 5:19:28 AM

Good One, Never understood this concept before, thanks for helping me.

Posted by Niks | Posted Date: 2/11/2013 5:21:03 AM


Related Discussions:- Program for declaration and additions of variables in c#, Assignment Help, Ask Question on Program for declaration and additions of variables in c#, Get Answer, Expert's Help, Program for declaration and additions of variables in c# Discussions

Write discussion on Program for declaration and additions of variables in c#
Your posts are moderated
Related Questions
I want a C# school project Project Description: The project is made in C# and haves a database connection. We have some small problems asking up data from the database.

How can we use .NET components in COM .NET components can't be used in straight forward way with the COM. You will require to create CCW in order to communicate COM components

What's difference between "Optimistic" and "Pessimistic" locking? In the pessimistic locking when user wants to update a data it locks the record and till then no one can updat

how make the google sign up page?

Hardware Monitor Tool in Visual Basic Project Description: Hi, seeking a developer who is experienced in Visual Basic 10 Or Visual Basic 13 and will develop an application li

What are the advantages of Distributed Processing? Benefits of distributed programming are:- a. Security/Encapsulation b. Faster Problem solving c. Distributed databas

What is SIX sigma? The Sigma means the deviation in Greek language. The Deviation means how much variations exist in a set of data. For illustrate  let's say in a software main

Project Description: We need to construct services in C# or VB.NET that can manipulate with a Targin TIP Protocol Server (protocol for financial information exchange), receive d


What is Object Relational Designer? The 0/R Designer provides a visual design surface to make LINQ to SQL entity classes and associations (relationships) that are based on obje