Try this:
Int32 length = yourList.Count;
In C#, arrays have a Length
property, anything implementing IList<T>
(including List<T>
) will have a Count
property.
Related Posts:
- How to Sort a List
by a property in the object - finding the maximum length of lists in c#
- How can I find a specific element in a List
? - Check if list is empty in C#
- C# List
to string with delimiter - Convert a list of strings to a single string
- How to initialize a list of strings (List
) with many string values - Select distinct using linq
- Are 2 dimensional Lists possible in c#?
- IEnumerable vs List – What to Use? How do they work?
- How to easily initialize a list of Tuples?
- Merge two (or more) lists into one, in C# .NET
- Converting from IEnumerable to List
- How to split() a delimited string to a List
- How to add List<> to a List<> in asp.net [duplicate]
- Sort list by field (C#)
- Remove duplicates from a List
in C# - Linq select objects in list where exists IN (A,B,C)
- C# Convert List
to Dictionary - How do I clone a generic list in C#?
- Quickest way to compare two generic lists for differences
- Convert HTML to PDF in .NET
- How to show a loading gif while an APi is being called in xamarin android?
- C# HttpClient An existing connection was forcibly closed by the remote host
- IOException: The process cannot access the file ‘file path’ because it is being used by another process
- Error : Index was outside the bounds of the array.
- No connection could be made because the target machine actively refused it?
- What does a lock statement do under the hood?
- How to make the script wait/sleep in a simple way in unity
- Could not load file or assembly or one of its dependencies
- All possible array initialization syntaxes
- What is C# equivalent of
- ASP.NET 5 MVC: unable to connect to web server ‘IIS Express’
- Why is this code throwing an InvalidOperationException?
- How to add a default Default.aspx to a ASP.NET Web Application Project?
- Only one usage of each socket address (protocol/network address/port) is normally permitted?
- Regex for numbers only
- Why should I use SerializeField?
- Access to the path is denied
- What does question mark and dot operator ?. mean in C# 6.0?
- How to jump in Unity 3d?
- ToList().ForEach in Linq
- Proper way to initialize a C# dictionary with values
- Incorrect string value: ‘\xEF\xBF\xBD’ for column
- How do I declare a DefaultValue attribute whose value is an array of strings?
- Unity3d restart current scene
- Get dictionary value by key
- Invalid URI: The format of the URI could not be determined
- Unity “The associated script can not be loaded” and “Win32Exception: The system cannot find the file specified”
- SQL Insert Query Using C#
- Convert Linq Query Result to Dictionary
- Get single value from dictionary by key
- What is the difference between “@Scripts.Render” and “
Recommended Hostings
Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.
FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.