ICollection support

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

ICollection support

Postby ThomasLund » 17 Jan 2012, 12:01

Just added this from my todo list - ICollection support on SFSArrays.

This should hopefully give you easier access to data.

Example usage:

Code: Select all

         // Mixed content array
         ISFSArray arrMixed = new SFSArray();
         
         arrMixed.AddBool(true);
         arrMixed.AddClass(obj1);
         arrMixed.AddInt(6);
         arrMixed.AddClass(obj2);         
         
         foreach (object obj in arrMixed) {
            Console.WriteLine(obj.ToString());
         }


Outputs

Code: Select all

True
Sfs2X.Test.TestObject
6
Sfs2X.Test.TestObject


Included in next release
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 24 guests