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
concept of strong names Strong name is similar to GUID(It is supposed to be unique in space and time) in the COM components.Strong Name is only needed when we need to deploy as

What is the meaning of object pooling? Object pooling is a method of storing a pool (group) of objects in memory that can be reused later as needed. Whenever, a new object is n

What are resource files? The Resource files are the files which contain program resources. Many programmers think that resource files are used only for storing strings. But you

Need Report Generation in SQL / .NET Project Description: Prepare a report generation web page by pulling information from an SQL Database. Filter parameters per report :

Live Chat Similar to Alibaba seller/ buyer chat Project Description: I want someone to design and implement for us a live chat program that will be used on our ecommerce webs

Explain the new features in ADO.NET Entity Framework 4.0. ADO.NET Entity Framework 4.0 is introduced in .NET Framework 4.0 and contain the following new features: Persisten

What is the difference between Authentication and authorization? This is  a tricky question. These two concepts seem altogether same  but there is big  difference. The Authenti

Script for auto seating poker Project Description: Not just like that though. I need a similar program that can scan during poker lobbys (pokerstars, ipoker, full tilt and on

Need Experienced dot Net and PHP Programmers Project Description: Need Experienced dot Net., JSP, PHP, Java Programmers Skilled professional and command in Programming eit

How do we assign page specific attributes? The Page attributes are specified by using the @Page directive.