Re: using generics to serialize primitives.
- From: Marc Gravell <marc.gravell@xxxxxxxxx>
- Date: Tue, 20 May 2008 23:47:59 -0700 (PDT)
If it comes to that I will overload the primitives like
they do with the system.convert() routines etc...
If overloading is an option, then just use BitConverter directly. I
only used generics here because it was in the original subject; this
has the dubious advantage that you can use it deep within generic
code, when you don't know the type of T, so overloads (such as
BitConverter) can't be used directly.
Re the performance, the whole setup is cached; all you have is a pre-
checked delegate invoke, so it shouldn't be too bad - not /quite/ as
quick as direct calls to an overload, but not far behind.
.
- Follow-Ups:
- Re: using generics to serialize primitives.
- From: Marc Gravell
- Re: using generics to serialize primitives.
- References:
- using generics to serialize primitives.
- From: Brian
- Re: using generics to serialize primitives.
- From: Marc Gravell
- Re: using generics to serialize primitives.
- From: Brian
- using generics to serialize primitives.
- Prev by Date: Re: .NET apps not being recognized as being in the Intranet Zone
- Next by Date: Re: using generics to serialize primitives.
- Previous by thread: Re: using generics to serialize primitives.
- Next by thread: Re: using generics to serialize primitives.
- Index(es):
Relevant Pages
|