Skip to main content

Posts

C# Tutorial, Step-7, General Structure of a C# program

Hello, welcome to All. My name is Abdul Yesdani. Today we are learning about C# program structure. We will discuss about how the program skeleton is made of, what are the different components are in the program. C# programs can have one or more files. Each file can contain no or plenty of namespaces. A namespace can contain types such as classes, structs, interfaces, enumerations, and delegates, in addition to other namespaces. According to the program needs we can add any of above mentioned types to the project. The following is the skeleton of a C# program that contains all of these elements. No need to have all of these elements in the program, here all possible elements mentioned.  // A skeleton of a C# program using System; namespace YourNamespace {      class YourMainClass      {                static void Main(string[] args)                {                     //Your program starts here...                }         }    class Your

C# Tutorial , Step-5, Built in Data Types

 Hello, Welcome to all. My name is Abdul Yesdani. Today we are going to learn about built in data types of C# language. The following list describe the C# built in types. Integral numeric types Type Description / Range bool True or false byte 0-255     Unsigned 8 bit integer sbyte -128 to 127       Signed 8 bit integer short -32,768 to 32,767         Signed 16-bit integer ushort 0 to 65,535               Unsigned 16-bit integer int -2,147,483,648 to 2,147,483,647    Signed 32-bit integer uint 0 to 4,294,967,295     Unsigned 32-bit integer long -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Signed 64-bit integer ulong 0 to 18,446,744,073,709,551,615 Unsigned 64-bit integer Floating Types float ±1.5 x 10−45 to ±3.4 x 1038             4 bytes double ±5.0 × 10−324 to ±1.7 × 10308        8 bytes decimal ±1.0 x 10-28 to ±7.9228 x 1028       16 bytes Other Types bool Represents true or false char Represents a Unicode UTF-16 character. String  Reference a sequence of zero or more Uni

Learn C# in Easy Way, Step-4 :Type conversion with strings, numbers.

 Hi, Welcome to all. My name is Abdul Yesdani. Today I am going to teach you how to convert string to number and vice versa. Conversion is two types : Implicit type conversion and Explicit type conversion. What is implicit type conversion in C#? C# compiler automatically converts from one type to other type is called implicit conversion. Example: int items =3;                 string person ="Kamat"; When we mix these two variables and print them see what we get.          Console.WriteLine( name + "sold " + items + " Products);  Output will be : Kamat sold 3 Products. In the above statement  'items' is a numeric variable, which is automatically converted to string. What is explicit conversion in C#? We need to force convert from one type to other type. Observe the following statements. I want to add 7 to the items.  Console.WriteLine( name + "sold " + items + 7+ " Products"); When we run it we get output : Kamat sold 37 Products. Here

Learn C# Programming in Easy way, Step-3. Variables, Datatypes, values.

Hi, Welcome to all. My name is Abdul Yesdani. Today we are going to learn how to work with different types , what is a variable, how the values are stored in a variable and how to work with numbers. A variable is a memory location to store a value or data. Different datatypes of variables needed to store different data. Numeric data types : int, double, float, decimal. Variables will be declared in association with data types. Example: int number =78; In the above statement 'int' is datatype and number is variable , '=' is assignment operator and '78' is value assigned to the variable. Create a new Console app in the Visual studio IDE, give a relevant name to the app.  Type the following code in the code editor. Run the application by pressing CTRL + F5 keys . You will get the output as shown below. Watch the video for the same.     

Learn C# in Simple way Step-2 the First program

 Hi, Welcome to all, My name is Abdul Yesdani. Another refreshing day to start with C# programming language by the grace of God. To day I am going to teach you the First Program of C# with Visual Studio IDE. Generally any computer program accept some input from the user,  it will be processed and give some output. To implement this we will create a basic console program in our Visual Studio IDE. Start Visual Studio in your laptop/ computer. Click on Create New project then it will show you different templates to choose.  Select C# Language , Select Console App(.Net Core) template from template list and click on NEXT.  Give a name to it. Click on CREATE button. It will create a solution Folder at specified location or at default location. Now a editor window will open just like shown below. You are ready to write your code. Start typing the code within the main() function. Now time to run the application.  In Debug menu choose start without debugging option or press Ctrl+F5 keys simulta

Learn C# Programming Language step1

 Hi, Welcome to All. My name is Abdul Yesdani. In this blog I am going to teach you C# programing language in a simple, easy way in step by step. Just you need to follow the course and do hands on practice to implement the concepts one by one.  Every time I will post one particular concept and its hands on exercises to practice.  What is C#?   C# is a programing language developed by Microsoft for it's .Net Framework. Periodically Microsoft have been releasing new versions as technology is evaluating forever. What you can do with C#? You can develop websites or web applications, desktop applications, mobile applications, games and other types of apps. What you need to learn C# ?   A laptop or Desktop computer with Windows10 OS and internet connection. You need to install Visual Studio 2019 community edition on your laptop , here is the setup information for you. In Google search bar just type Visual Studio download, click on the visualstudio.microsoft.com link.  It will take you to