Total Page Preview:   000000000423

What is List in C sharp in English and Hindi

 

 

 

List in C-Sharp in English:

In C#, a list is a collection of items of the same data type that can be dynamically resized. It is one of the most commonly used collection types in C# programming. Lists are implemented using the generic List<T> class.

In other word word you also can say C#, a list is a collection type that can hold a group of elements of the same data type. It is one of the most commonly used collection types in C# because of its flexibility and ease of use. The elements in the list are stored in a contiguous manner and can be accessed using an index.

 
Here is an example of creating and using a list of integers:
 
 
In this example, we create a list of integers called numbers using the List<int> class. We then add four numbers to the list using the Add method, and access and change individual items in the list using the square bracket notation. We also remove an item from the list using the Remove method.
 
Finally, we iterate over the list using a foreach loop and output each item to the console.
 
 
List in C-Sharp in Hindi:
 
List C# mai ek generic collection hota hai, jo ki ek ordered sequence of elements ko store karta hai. Ye collection items ko index ki madad se access karta hai, aur resizable hota hai, yani ki ham iski size ko dynamically modify kar sakte hai.
 
Example ke liye, agar hum ek List of integers banana chahte hai, toh hum is tarah se kar sakte hai:
 
 
Ab hum is List mai integers ko add kar sakte hai:
 

Ham iss list ka size bhi change kar sakte hai:

Hum is List ko iterate bhi kar sakte hai:

Iss example mai, humne ek List of integers banaya, usme integers ko add kiya, aur uska size bhi badla. Fir humne foreach loop ka use karke iss List ke elements ko iterate kiya aur console par print kiya.

 

 

 

 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments


                           
                           

                           

                           

Facebook User: