
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Array LongLength Property in C#
The Array.LongLength property gets a 64-bit integer that represents the total number of elements in all the dimensions of the Array.
Let’s say your array of long data type is −
long[,] arr1= new long[15, 35];
Use the LongLength property to get an integer representing the total number of elements in all dimensions of the Array −
arr1.LongLength
Let us see an example to implement the Array.LongLength property of array class −
Example
using System; class Program { static void Main() { long[,] arr1= new long[15, 35]; long len1 = arr1.GetLongLength(0); Console.WriteLine(len1); Console.WriteLine(arr1.LongLength); } }
Output
15 525
Advertisements