Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created February 6, 2013 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolfbjarne/7b312f7ed9edc9f25bc0 to your computer and use it in GitHub Desktop.
Save rolfbjarne/7b312f7ed9edc9f25bc0 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.Dialog;
namespace lib1
{
public static class lib1<T>
{
private static List<object> _someList = new List<object>();
public static void Test ()
{
AddToList ();
CheckList ();
}
private static void AddToList()
{
_someList.Add(new object());
// from here you can see the item added
// once this method exits _someList will be empty again
Console.WriteLine ("AddToList: count = {0}", _someList.Count);
}
private static void CheckList ()
{
Console.WriteLine ("CheckList: count = {0}", _someList.Count);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment