Support us on YouTube by Subscribing our YouTube Channel. Click here to Subscribe our YouTube Channel

Saturday, 19 March 2022

Program to remove the duplicate character from the string

In this program, we will learn How to remove the duplicate character from the string in C#.

I will recommend you to check the below link for Top C# Interview Programs asked during the Interview and Examination.

Program to remove the duplicate character from the string
As C# in the case-sensitive language, I am converting the string to the lowercase string so that I can compare the characters otherwise capital characters and small alphabetical characters will be treated as different characters.
Program to remove the duplicate character from the string in C# in mentioned below:

Console.WriteLine("Enter a string to remove duplicate character from it:");

//Receive input from the user

string inputString = Console.ReadLine();

//Converting the inputString to lowercase

//other wise Uppercase and lowercase will be considered as difference character

inputString = inputString.ToLower();

//result for holding the distinct characters

string result = string.Empty;

//Loop through each character of the string

for (int i = 0; i < inputString.Length; i++)

{

    //If character is not added (contains) in the result variable, Add it to the result string

    if (!result.Contains(inputString[i]))

    {

        result += inputString[i];

    }

}

//Show the final result to the user

Console.WriteLine(result);

//Console.ReadLine() to hold the screen after the execution of the program

Console.ReadLine();

Output:

I hope this example will help in your interview/exam preparation.
Thanks
Protected by Copyscape - Do not copy content from this page.

Friday, 18 February 2022

Learn Angular in Hindi (YouTube Series)

Recently, we have begun the “Learn Angular in Hindi” Series on our official YouTube channel. Many people commented/wrote us to start a series in Hindi on it. We need your support to make it successful. Please do like 👍 and subscribe ❤  to our channel if found useful. 

Saturday, 15 January 2022

How to Install SQLyog Community Edition

In this article, we will learn How to install SQLyog Community Edition in Windows Operating System. Currently, I am using it to access the MySQL Database. In case you are looking to install MySQL or MySQL Workbench then please check the below article.

Sunday, 23 May 2021

Monday, 26 April 2021

Wednesday, 14 April 2021

How to install Visual Studio 2019

In this article, we will see How to install Visual Studio 2019 in the windows 10 operating system.

Microsoft Visual Studio is an Integrated Development Environment (IDE) which is used to develop computer programs, websites, web applications, web services, mobile applications, etc. It supports around 36 different programming languages with a code editor having IntelliSense (code completion component). One of the most basic and popular editions of Visual Studio is Community Edition. Visual Studio includes a debugger that works both as a source-level debugger and as a machine-level debugger. Debugger allows setting the breakpoints and watches to monitor the value of the variables as the execution progresses.


Visit https://visualstudio.microsoft.com/ in order to download Visual Studio as per your system architecture as well as requirement.
Choose Visual Studio Edition which you want to install in your machine. I will recommend you to download Community Edition, which is best for Students or Individual Developers.
On selecting the edition, an executable setup of Visual Studio is downloaded. Click on the .exe file in order to start the installation process. On the first screen, you can see the privacy and license terms, click on continue.
In the next step, it will download the files required to proceed with the installation.
Once all files are downloaded, a screen as shown in the below image will appear. Select the workload as per your development requirement. You can also select the Individual components; language packs, etc., and then click on Install. On the right-hand side, it will show the total space required for the installation.
Selected workloads, components will start downloading. Select the start after installation checkbox option in case if you want to start the Visual Studio after the installation.
Once installation is done, search for the Visual Studio (in my case it's Visual Studio 2019) in the Start Button. Click on it in order to launch the application.
You are now ready to develop cool applications. Create a new project or open an existing project or solution.
I hope this article will help you in installing Visual Studio.
Thanks.

Wednesday, 31 March 2021

Understanding OutOfProcess Hosting Model in ASP.NET Core

In this article, we will learn OutOfProcess Hosting Model in ASP.NET Core. If you are new to ASP.NET Core, then I will recommend you to go through the below articles of this series:

In the previous article, we learned, How to configure InProcess hosting model in ASP.NET Core. We configured the AspNetCoreHostingModel value as InProcess in the .csproj file and saw that the application is hosted through IISExpress / wpw3.exe worker process.
In this article, we will see how to host an application on the OutOfProcess hosting model. In OutOfProcess hosting model, there are two web servers, one is Internal Web Server which is basically a Kestrel server and another is External Web Server which can be either IIS, Ngnix, Apache, etc. dotnet.exe is the process that runs and hosts the application with the Kestrel Web Server.

1. Internal Web Server: In an internal web server, the Kestrel web server is the internet-facing web server as all the HTTP requests are directly processed by it.
2. External Web Server: In External Web Server, Reverse proxy server which can be either IIS, Ngnix, Apache, etc. is used along with Kestrel web Server. A reverse Proxy server provides additional security as well as configurations that are not available in Kestrel Server. It also provides load balancing functionality.

Let’s edit the .csproj file and set AspNetCoreHostingModel value as OutOfProcess (Value of AspNetCoreHostingModel is case-insensitive)

Or we can also change its value by right-clicking on the project and click on the properties as shown in the below image.
Click on debug menu, and change the value of the Hosting Model from the dropdown to OutOfProcess. We can use any one method in order to change the Hosting Model.
Now let’s run the application through IIS Express. You can see that the application is served through Kestrel Server (with DotNet.exe process)


Now let’s run the Application through Launch Application by selecting the profile to run the application with DotNet CLI or by the DotNet CLI command in order to check the Worker Process / Server serving the application. As we can see Kestrel server is serving the application.


Some of the difference between the InProcess vs OutOfProcess hosting model are:
1. In InProcess hosting model, request and response are served through w3wp.exe or IISExpress whereas in the OutOfProcess worker process involved is dotnet.exe
2. In InProcess hosting model, single web server is used whereas, In OutOfProcess hosting model, two web servers can be used.
3. InProcess hosting model provides better performance as compared to OutOfProcess hosting model. 

I hope this article helped you in understanding the OutOfProcess hosting model.
Thanks.

Subscribe us on YouTube

Subscribe Now

Popular Posts

Contact us

Name

Email *

Message *

Like us on Facebook