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 am looking individuals who have industry experience working on Microsoft Technology and Jquery ( MVC 4.5 ), who will take live online session and give training through Team Viewe

Create page website to catalog some of the music: A homepage:  that automatically comes up when you go to 127.0.0.1:3000 (instead of the default Ruby-on-Rails pa

Explain Forms authentication in detail. In the old ASP if you were said to create a login page and do authentication you have to do lot of custom coding. But now in ASP.NET tha

We are seeking for online invoice OCR solution. That will help us to automate accounts payable function. User could be able to use the existing pdf file or scan a document, then

Project Description: We are looking for same usability/options of coachup.com thus, we will have different own UI design. Conditions: State your price and please describe/

Design an interface and add code to command buttons using case statement, to find coursework to be calculated using formula 0.6*1/6*total Mark

Explain assemblies An assembly is a single deployable unit that having all the information about the implementation of : - classes - structures and - interfaces An

Perform Arithmetic Operations - c# Program Hello, i didn't find the correct way of using arithmetic operations in c#. I am beginner for this language. Please suggest me some e

Needed Expert Ruby in Rail Deveoloper - urgent Project Description: I require an expert Ruby on Rail developer. Need someone who has depth in knowledge of Ruby on Rail. Wi

Project Description: I need support on .net c# automation testing Additional Project Description: Project is on Visual Studio, creating Automation and TFS Test development