0

Can any one tell me what is equivalent of NSMutableDictionary(), NSMutableArray() ,NSArray And NSDictionary in C#

ColeX
  • 14,062
  • 5
  • 43
  • 240
xam
  • 3
  • 6

1 Answers1

0

First, there is no difference from mutable and immutable on Array and Dictionary in C#.

We can both change the value after it is initialized. It means they are all Mutable.

For NSMutableDictionary and NSDictionary

  Dictionary<string, object> dict = new Dictionary<string, object>();
  dict["a"] = new NSString(); // set
  var Object = dict["a"];  //get

For NSMutableArray and NSArray

 List<object> list = new List<object>();
 list.Add(new NSString());    //set
 NSString str = list[0] as NSString;   //get
ColeX
  • 14,062
  • 5
  • 43
  • 240