[Mono-list] Mono parsing error on multiline if

Smjert smjert30 at libero.it
Sun Oct 18 04:27:22 EDT 2009


It's what i did (we still compile with 2.0).
Now i have to solve other errors.. that doesn't occurs on the not modified
version of the game server, i'll ask there.

Chris Howie wrote:
> 
> On Sat, Oct 17, 2009 at 10:58 AM, Smjert <smjert30 at libero.it> wrote:
>> Anyway, it seems that the shorter way is to modify that if.....
> 
> Yeah, honestly, I'd probably do something like
> 
> private static Type[] typeListFoo = { typeof(ClassA), typeof(ClassB) };
> 
> Then, if you are targeting 3.5, use Linq:
> 
> Type objectType = theObject.GetType();
> if (typeListFoo.Any(type => type.IsAssignableFrom(objectType))) { ... }
> 
> -- 
> Chris Howie
> http://www.chrishowie.com
> http://en.wikipedia.org/wiki/User:Crazycomputers
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Mono-parsing-error-on-multiline-if-tp25932445p25944828.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list