C# | Check if an Array has fixed size or not Last Updated : 01 Feb, 2019 Comments Improve Suggest changes Like Article Like Report Array.IsFixedSize Property is used to get a get a value indicating whether the Array has a fixed size. This property implements the IList.IsFixedSize Property . Syntax: public bool IsFixedSize { get; } Property Value: This property is always return true for all arrays. Below programs illustrate the use of above-discussed property: Example 1: CSharp // C# program to illustrate // IsFixedSize of Array class using System; namespace geeksforgeeks { class GFG { // Main Method public static void Main() { // declares an 1D Array of string string[] topic; // allocating memory for topic. topic = new string[] {"Array, ", "String, ", "Stack, ", "Queue, ", "Exception, ", "Operators"}; // Displaying Elements of the array Console.WriteLine("Topic of C#:"); foreach(string ele in topic) Console.WriteLine(ele + " "); Console.WriteLine(); // Here we check whether is // array of fixed size or not Console.WriteLine("Result: " + topic.IsFixedSize); } } } Output: Topic of C#: Array, String, Stack, Queue, Exception, Operators Result: True Example 2: CSharp // C# program to illustrate // IsFixedSize of Array class using System; namespace geeksforgeeks { class GFG { // Main Method public static void Main() { // declares a 1D Array of string // and assigning null to it string[] str = new string[] {null}; // Here we check whether is // array of fixed size or not Console.WriteLine("Result: " + str.IsFixedSize); } } } Output: Result: True Note: Array implements the IsFixedSize property because it is required by the System.Collections.IList interface. An array with a fixed size does not allow the addition or removal of elements after the creation of an array, but modification of existing elements are allowed. Retrieving the value of this property is an O(1) operation. Reference: https://docs.microsoft.com/en-us/dotnet/api/system.array.isfixedsize?view=netframework-4.7.2 Comment More infoAdvertise with us Next Article C# | Check if an Array has fixed size or not K Kirti_Mangal Follow Improve Article Tags : C# CSharp-Arrays Similar Reads C# | Check if the ArrayList has a fixed size ArrayList represents an ordered collection of an object that can be indexed individually. It is basically an alternative to an array. It also allows dynamic memory allocation, adding, searching and sorting items in the list. ArrayList.IsFixedSize property is used to check whether the ArrayList has a 2 min read C# | Check if a SortedList object has a fixed size SortedList class is a collection of (key, value) pairs which are sorted according to keys. Those pairs can be accessible by key and as well as by index(zero-based indexing). This comes under System.Collections namespace. SortedList.IsFixedSize property is used to check whether a SortedList object ha 2 min read C# Arrays An array is a group of like-typed variables that are referred to by a common name. And each data item is called an element of the array. The data types of the elements may be any valid data type like char, int, float, etc. and the elements are stored in a contiguous location. Length of the array spe 8 min read C# Program to Check a Specified Type is an Array or Not In C#, an array is a group of homogeneous elements that are referred to by a common name. So in this article, we will discuss how to check the variable is of array type or not. To do this task, we use the IsArray property of the Type class. This property is used to determine whether the specified ty 2 min read How to Check if Empty Array in C? Prerequisite: Array in C The array is a type of Data-structure that can store homogeneous data-type elements. The size of the array is fixed. Syntax: int arr[N]; here, the data type of the array is an integer, the name of an array is arr, and the size of the array is N. Example: C // C Program to de 3 min read How to Find Size of Dynamic Array in C? In C, dynamic memory allocation allows us to manage memory resources during the execution of a program. Itâs particularly useful when dealing with arrays where the size isnât known at compile time. In this article, we will learn how to find the size of a dynamically allocated array in C. Find Size o 2 min read How to Find the Size of an Array in C? The size of an array is generally considered to be the number of elements in the array (not the size of memory occupied in bytes). In this article, we will learn how to find the size of an array in C.The simplest method to find the size of an array in C is by using sizeof operator. First determine t 2 min read Maximum Size of an Array in C Array in C is a collection of elements of the same data type that are stored in contiguous memory locations. The size of an array is determined by the number of elements it can store and there is a limit on this size. The maximum size of an array in C is determined by many factors, including the dat 4 min read Properties of Array in C An array in C is a fixed-size homogeneous collection of elements stored at a contiguous memory location. It is a derived data type in C that can store elements of different data types such as int, char, struct, etc. It is one of the most popular data types widely used by programmers to solve differe 8 min read Like