Posts

Getting Started with Visual Studio IDE

Image
Visual Studio 2022 Preview Go to the link given below and download Visual Studio Community . https://visualstudio.microsoft.com/vs/preview/vs2022/#download-preview How to Create a C# Console Application Run Visual Studio Community after successfully installing it to your computer. Then you can see a window as shown in the image below. Click on the Create a new project button and then you can see a window as shown in the image below. Select Console App (.NET Framework) item as shown in the image below and click on the Next button. Then you can see a window as shown in the image below. You have to type a suitable name for your project in Project name box. I have typed the name My First Project . Select a suitable location to save your project from the Location box. I had already created a folder called HL on the desktop and I am going to save the project in that folder. Now click on the Create button and what you can see then is shown in the image below. You can see Solution Expl

Databases in C#

Image
How to Create a Database Create a new Windows Forms App (.NET Framework) project with the name Database Project 1 and save it on the desktop. Click on Project > Add New Item...  from the menu as shown in the image below. Select Service-based Database item from the Add New Item dialog box and type Employees.mdf in the Name: box as shown in the image below. Then click on Add button.  Now you can see the created database in the Solution Explorer  as shown in the image below. How to Create a Table in the Database Right click on the database in the  Solution Explorer  and select  Open  item as shown in the image below. The  Server Explorer  appears when the  Open  item is clicked as shown in the image below. Right click on  Tables  item and select  Add New Table  item as shown in the image below. A tab with the name dbo.Table [Design] appears when Add New Table item is clicked as given in the image below. Go to the code given below in the tab. CREATE TABLE [dbo].[Table] ( [Id