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

Professional TELERIK Bind MS ACCESS Required: 1. Including custom fields to the Schedule. 2. Schedule Calendar Sync with Outlook 3. Selecting display in Schedule res

hello,i want to ask that i have to make a test taker just like a quiz in vb.net which should b like mcq''z one...it must contain a connectivity with database of oracle or MS access

What are the different elements in Functions points? 1) Internal Logical Files (ILF): Following are some points to be noted for ILF:- The ILF are logically related d

We need programmers and accountants Skills required are .NET, C# Programming, Graphic Design, Commercials, Software Architecture

Write the basic syntax of a LINQ query in Visual Basic as well as in C#. In Visual Basic, the basic syntax of a LINQ query begins with the from clause and ends with the Select

What are the various ways of authentication techniques in ASP.NET? The Selection of  an authentication provider is as simple as making an entry in  the web.config file of  the

In What scenarios you use a DOM parser and SAX parser? 1) If you do not require all the data from the XML file then SAX approach is most preferred than DOM as DOM can quiet mem

what are major difference between classic ADO &ADO.NET?

Looking for web designer Project Description: I am seeking website designer with developing skills of Html, .Net and also supports in all browsers. Please ping your previous