Friday, 1 April 2016

Basic Of C#

Variable in C# :

  • A variable represents a numeric or string value or an object of a class. The value that the variable stores may change, but the name stays the same. A variable is one type of field. The following code is a simple example of how to declare an integer variable, assign it a value, and then assign it a new value.
  • int x = 15;  // x holds the value 15
    x = 7;      // now x holds the value 7
string words = "Hello, World!";
Response.write(words);

Conditional Statement :

In conditional statementsconditional expressions and conditional constructs are features of a programming language, which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false

If - Else Statement Coding;

protected void Page_Load(object sender, EventArgs e)
 { 
           string str = "hellow";
           if (str == "hellowe") 
                    { 
                  Response.Write("yes"); } else { Response.Write("No");
                     } 
 }

No comments:

Post a Comment

Part 20 consuming rest api in ionic

in this video, I will show you that how you can consume the rest API. in the previous video we have implemented the asp.net web API projec...