no reply? I assumed it was c# not mono-droid? Did you have a lot of things
you were initializing statically? I wanna blog this so others can find it
but tell me what happened. I won't use your name I'll just say, if you get
a nullrefexp and you are using a lot of static stuff, and your static
object suddenly goes null... you might need static constructors.


On Mon, Jun 18, 2012 at 4:22 PM, Sayed Arian Kooshesh <koosh...@gmail.com>wrote:

> switch all your code to using this
> http://msdn.microsoft.com/en-us/library/k9x6w0hc%28v=vs.80%29.aspx
>
> and then see if the problem persists.
>
> On Mon, Jun 18, 2012 at 4:20 PM, Sayed Arian Kooshesh 
> <koosh...@gmail.com>wrote:
>
>> fuck i know what it is.
>>
>> See static in c# is a bit.. tricky.
>>
>> Switch to using a static constructor. You may be running into a problem
>> where the static stuff isn't really initialized or something doesn't stay
>> around. I ran into it a lot on C# desktop apps and it lead to me to using
>> static constructors.
>>
>> A static constructor is called the firsttime a static object is
>> referenced or a static function is referenced but you have to call it by
>> the class name.
>>
>> Like
>>
>> MyStatiClass.ReadDoDo();
>>
>>
>>
>> if in MyStatiClass you had
>>
>>
>> public static MyStatiClass
>> {
>> public static int terd;    // if you are init'ing terd here. you might
>> just be a rednec.. erm you might not want to do that.
>>                                    //static constructor guarantee
>> initialization and are a good point for log messages.
>> static MyStatiClass()
>> {
>> terd = 0;
>>
>>
>> }
>>
>> }
>>
>> On Mon, Jun 18, 2012 at 4:17 PM, Sayed Arian Kooshesh <koosh...@gmail.com
>> > wrote:
>>
>>> I'm not commenting till I see the code
>>>
>>
>>
>>
>> --
>> Extreme Knowledge is not something for which he programs a computer but
>> for which his computer is programming him.
>>
>> -Wozniak
>>
>
>
>
> --
> Extreme Knowledge is not something for which he programs a computer but
> for which his computer is programming him.
>
> -Wozniak
>



-- 
Extreme Knowledge is not something for which he programs a computer but for
which his computer is programming him.

-Wozniak
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to