Hello friends, I hope you all are great. Today, I am posting 10th tutorial in C# series and its about How to use while Loop in C#. It's gonna be a quick tutorial, as there's not much to discuss.
In our 8th tutorial in C# series, we have had a look at How to use IF Loop in C# and we have seen that IF loop takes a Boolean expression and if it's TRUE then it allows the compiler to enter in it just once. While loop is quite similar to IF loop as it takes a Boolean expression as well but it will keep on executing again & again, so let's have a look at it in detail:
How to use while Loop in C#
While Loop in C# takes a Boolean expression as a condition and it will keep on executing as long as the conditional expression returns true, we can say Exe ...
Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at How to use switch Statement in C# and its our 9th tutorial in C# series. In our previous tutorial, we have seen IF Loop in C# and this switch statement is also a loop but works slightly different than IF loop and it totally depends on your application, which one you want to use.
First we will have a look at How to use switch statement in C# and after that we will also study goto statement, because switch and goto statements are normally used together. So, let's get started with it:
How to use switch Statement in C#
Switch Statement is a loop in C# which takes a variable as a condition, and then creates its different cases and we can deal each case se ...
Hello everyone, I hope you all are doing great. Today, we are gonna have a look at IF Loops in C# and it's 8th tutorial in C# series. So far, we have discussed some basic concepts in C# and now we are ready to get our hands on Loops in C#.
C#, as any other programming language, supports a lot of loop structures, we will discuss each one of them separately in our coming tutorials. Today, we will discuss the simplest of them all, which is IF loop, so let's get started with How to use IF Loop in C#:
How to use IF Loop in C#
IF Loop in C# takes a Boolean expression as a condition and if this condition is TRUE, the compiler executes the code inside IF loop { } and if the condition is wrong, the compiler simply ignores the code.
Here's the syntax o ...
Hello friends, I hope you all are having fun. In today's tutorial, we are going to discuss How to use Arrays in C#. It's our 6th tutorial in C# series and currently we are focusing on basic concepts in C#.
Without understanding these simple concepts, we can't move forward. So, let's get started with Arrays in C#:
How to use Arrays in C# ???
An array (base type System.Array) is a collection of similar (like-typed) data types, called by a common name. Each data item is referred as an element of array and is assigned an index starting from 0.
As C# array is an object so we can find its length using member length, which is actually a count of total number of data items in that array.
Arrays are reference types and implement IEnumerable that' ...
Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at Datatype Conversions in C#. We have discussed C# Data Types in our 3rd tutorial and today we will discuss How to convert one datatype into another.
If you are working on some complex project, then you have to convert one form of data into another i.e. let's say you are getting bill value from barcode reader, this value must be a string and if you want to apply any arithmetic operation on it then you need to convert that string into integer or float. So, let's get started with Datatype Conversions in C#:
Datatype Conversions in C#
If you are working on some data driven application, then there's always a need to convert one form of data into another an ...
Hello friends, I hope you all are doing great. In today's tutorial, we are going to have a look at few Common Operators in C#. It's 4th tutorial in C# series and before going forward, we have to first understand the working operation of these C# operators.
We have a lot of operators in C# but I have discussed few of them, which are most commonly used. If you got into any trouble then ask in comments. So, let's get started with Common Operators in C#:
Common Operators in C#
Operators are used to create a link, relation or operation between two entities/variables. Few of these C# operators are as follows:
Assignment Operator ( = )
Arithmetic Operators ( + , - , * , / , % )
Comparison Operators ( == , != , > , < , >= , <= )
Co ...
Hello friends, I hope you all are doing great and having fun with your lives. In today's tutorial, we will discuss in detail about NuGet Package Management in ASP.NET MVC. It's 15th tutorial in ASP.NET MVC series. Today's tutorial is not about programming, instead we are gonna discuss this pre installed tool NuGet Package Management in ASP.NET MVC.
NuGet Package Management is use to install packages and libraries, which you want to use in your project. It downloads the files online and then installs it. So, let's discuss this ASP.NET MVC tool in detail:
NuGet Package Management in ASP.NET MVC
NuGet Package Management is a package manager for ASP.NET MVC, which is used for downloading and installing different packages & Libraries online.
I ...
Hello friends, I hope you all are doing great. In today's tutorial, we will discuss Validation in ASP.NET MVC. It's our 14th tutorial in ASP.NET MVC series. In our previous tutorial, we have seen Model Binding in ASP.NET MVC and you have seen we have created a View for our Model class.
In today's tutorial, we are gonna add some validations on the data provided by the users in those Text box fields. We will place some constraints like the age must be above 13 or the characters of name must be between 4 to 20. So, let's have a look at How to deal with Validation in ASP.NET MVC:
Validation in ASP.NET MVC
Validation uses built-in attribute of ASP.NET called DataAnnotations and is used to validate inputs provided by the user.
Validation is a very ...
Hello friends,I hope you all are doing great and having fun with your lives. In today's tutorial, we are gonna have a look at Model Binding in ASP.NET MVC. It's our 13th tutorial in ASP.NET MVC series. Today, we are gonna discuss a new concept in ASP.NET MVC and it's more of a luxury as it automates the job and makes our work easy.
Suppose, in your application, you want to create a registration form and thus you need to pass this data from View to your model, so that it could be saved in your database. So, in order to bind this HTTP request data from View to Model, we use Model Binding. Let's have a look at Model Binding in ASP.NET MVC in detail:
Model Binding in ASP.NET MVC
Model Binding in ASP.NET MVC is used to bind the data sent by the HTTP ...
Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at HTML Helpers in ASP.NET MVC. It's our 12th tutorial in ASP.NET MVC series. I know every tutorial is a new concept for you to understand but we have to cover all of them before starting working on our project in ASP.NET MVC.
If you have worked on ASP.NET web forms or C# / Visual Basic projects then you must be aware of toolboxes, from where we can drag and drop our visual components like textbox, editbox, button etc. But in ASP.NET MVC applications, we don't have this luxury of drag and drop. Instead we have HTML Helper classes which are used to created these html components in ASP.NET MVC. So, let's have a look at How to use HTML Helpers in ASP.NET MVC: ...