Logo 
Search:

C# Articles

Submit Article
Home » Articles » C# » CollectionsRSS Feeds

Example of Array.IsReadOnly Property

Posted By: Vivek Patel     Category: C#     Views: 0

Array.IsReadOnly is use in determining whether array is read only or not.
 

Example of Array.IsReadOnly Property


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharpDemoApps
{
class Program
{
static void Main(string[] args)
{
// Creates and initializes a new integer array.
int[] myIntArray = new int[5] { 1, 2, 3, 4, 5 };

if (myIntArray.IsReadOnly)
Console.WriteLine("Array is Read Only");
else
Console.WriteLine("Array is NOT Read Only");

Console.ReadLine();
}
}
}
  
Share: 

 
 
 

Didn't find what you were looking for? Find more on Example of Array.IsReadOnly Property Or get search suggestion and latest updates.

Vivek Patel
Vivek Patel author of Example of Array.IsReadOnly Property is from United States. Vivek Patel says

I have started working in .Net Technology since its beta release and lucky to got chance to work on .Net 1.1, 2.0 and now working on .Net 3.5. I have worked in both C# and VB.Net for Asp.net Projects. I can also provide Sharepoint development needs. I can efficiently switch role from Tech Lead and Developer. I have comprehensive knowledge of Asp.net Development. I have been award Microsoft Most Valuable Award twice in Asp.net Technology.

Blog: http://dotnetguts.blogspot.com

 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!