C# | Finding the index of first element in the array Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report GetLowerBound() Method is used to find the index of the first element of the specified dimension in the array. Syntax: public int GetLowerBound (int dimension); Here, dimension is a zero-based dimension of the array whose lower bound needs to be determined. Return Value: The return type of this method is System.Int32. This method returns the index of the first element of the specified dimension in the array. Exception: This method will give IndexOutOfRangeException if the value of dimension is less than zero, or equal or greater than Rank. Note: GetLowerBound(0) returns the starting index of the first dimension of the array, and GetLowerBound(Rank - 1) returns the starting index of the last dimension of the array. The GetLowerBound method always returns a value that indicates the index of the lower bound of the array, even if the array is empty. This method is an O(1) operation. Below programs illustrate the use of GetLowerBound() Method: Example 1: CSharp // C# program to illustrate the GetLowerBound(Int32) // method in 1-D array using System; public class GFG { // Main method static public void Main() { // 1-D Array int[] value = {1, 2, 3, 4, 5, 6, 7}; // Get the index of the first element // in the given Array by using // GetLowerBound(Int32) method int myvalue = value.GetLowerBound(0); Console.WriteLine("Index: {0}", myvalue); } } Output: Index: 0 Example 2: CSharp // C# program to illustrate the GetLowerBound(Int32) // method when the array is empty using System; public class GFG { // Main method static public void Main() { // Empty 1-D Array int[] value = {}; // Get the index of the first element // in the given Array by using // GetLowerBound(Int32) method int myvalue = value.GetLowerBound(0); Console.WriteLine("Index: {0}", myvalue); } } Output: Index: 0 Reference: https://learn.microsoft.com/en-us/dotnet/api/system.array.getlowerbound?view=netcore-2.1 Comment More info K Kirti_Mangal Follow Improve Article Tags : C# CSharp-method CSharp-Arrays Explore IntroductionC# Tutorial 4 min read Introduction to .NET Framework 6 min read C# .NET Framework (Basic Architecture and Component Stack) 6 min read C# Hello World 2 min read Common Language Runtime (CLR) in C# 4 min read FundamentalsC# Identifiers 2 min read Data Types in C# 6 min read C# Variables 4 min read C# Literals 5 min read Operators in C# 7 min read C# Keywords 5 min read Control StatementsC# Decision Making (if, if-else, if-else-if ladder, nested if, switch, nested switch) 5 min read C# Switch Statement 4 min read Loops in C# 4 min read C# Jump Statements (Break, Continue, Goto, Return and Throw) 4 min read OOP ConceptsClass and Objects in C# 4 min read Constructors in C# 5 min read C# Inheritance 3 min read Encapsulation in C# 2 min read C# Abstraction 4 min read MethodsMethods in C# 4 min read Method Overloading in C# 4 min read C# | Method Parameters 7 min read Method Overriding in C# 7 min read Anonymous Method in C# 3 min read ArraysArrays in C# 6 min read Jagged Arrays in C# 4 min read Array Class in C# 5 min read How to Sort an Array in C# | Array.Sort() Method Set - 1 8 min read How to find the rank of an array in C# 2 min read ArrayListArrayList in C# 6 min read C# ArrayList Class 7 min read C# | Array vs ArrayList 2 min read StringStrings in C# 6 min read C# Verbatim String Literal - @ 5 min read C# String Class 9 min read C# StringBuilder 4 min read C# String vs StringBuilder 3 min read TupleC# Tuple 7 min read C# Tuple Class 3 min read C# ValueTuple 7 min read C# ValueTuple Struct 4 min read IndexersC# Indexers 4 min read C# Multidimensional Indexers 5 min read C# - Overloading of Indexers 3 min read Like