ExceptionDuck said:
Jonwib said:

I did something like this to copy Jquery.data function


public static class extends{
  public static Dictionary> v = new Dictionary>();
  public static object data(this object o, object key,object val = null)
   if (!v.ContainsKey(o))
   v[o] = new Dictionary();
    return v[o][key];
   v[o][key] = val;
   return val;

It won't distinguish between equal simple types, but for complex it works well.


With this you can call any object's data method


F = new Form();



and inside F you could call


this.data("language") and it would return "EN"

Wow, thread Necromancy!


Also, use F# you can extend everything Smiley