Re: Newbie: When to use typeof() function
- From: "Patrice" <http://www.chez.com/scribe/>
- Date: Wed, 22 Apr 2009 17:53:43 +0200
string is just a *keyword* that express a type. typeof allows to return a
*variable* that symbolizes this type *name*.
Don't see this as returning the "type of a type" but as returning a type
variable for a type "literal" mentioned in your source code....
--
Patrice
"GiJeet" <gijeet@xxxxxxxxx> a écrit dans le message de groupe de discussion
: cd88b635-14b0-4587-a38b-1c4a47a9fbff@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 22, 8:11 am, Family Tree Mike
<FamilyTreeM...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
"GiJeet" wrote:
Hello, I see the use of typeof() function often when I'm reading code
but I'm not sure when I would need to use it. I understand it returns
the type of a type. huh? It's kind of confusing. Can someone provide
an example of when I would need to know the type of something and
would need to use typeof(). Thanks.
Thanks for the examples but I guess now my question is WHY do I need
to get the type of a type? Is it a run-time thing? I mean, we know
the types at design time.
.
- Follow-Ups:
- Re: Newbie: When to use typeof() function
- From: Jeff Johnson
- Re: Newbie: When to use typeof() function
- References:
- Newbie: When to use typeof() function
- From: GiJeet
- RE: Newbie: When to use typeof() function
- From: Family Tree Mike
- Re: Newbie: When to use typeof() function
- From: GiJeet
- Newbie: When to use typeof() function
- Prev by Date: ListView Scrollbar control
- Next by Date: C# Regular expression to find all instance and add a prefix
- Previous by thread: Re: Newbie: When to use typeof() function
- Next by thread: Re: Newbie: When to use typeof() function
- Index(es):
Relevant Pages
|