How to use - TypeConvertor class

Discussion in 'ASP .Net' started by Makarand, Nov 5, 2003.

  1. Makarand

    Makarand Guest

    Hi

    Can anybody tell me how to use TypeConvertor class?

    Thing is i want to do dynamic(during runtime) type casting
    in my code.

    Thnanx

    Makarand
    Makarand, Nov 5, 2003
    #1
    1. Advertising

  2. Makarand

    Janaka Guest

    I find the best one to use is the Convert class. Its got plenty of
    overloads for Converting practically any type into another, and these are
    all static. example:
    string refNumber = "12312";
    int curRef = Convert.ToInt32(refNumber);

    see
    http://msdn.microsoft.com/library/d...s/cpref/html/frlrfsystemconvertclasstopic.asp

    Janaka

    "Makarand" <> wrote in message
    news:06cb01c3a36a$ac6c5eb0$...
    > Hi
    >
    > Can anybody tell me how to use TypeConvertor class?
    >
    > Thing is i want to do dynamic(during runtime) type casting
    > in my code.
    >
    > Thnanx
    >
    > Makarand
    Janaka, Nov 5, 2003
    #2
    1. Advertising

  3. Makarand

    Guest Guest

    Hi

    Thing is that I don't want to convert from one base type
    to another base type.

    I have object of type oject which i need to convert to
    userdefined data types.

    I hope this time I made my point more clear.

    Regards
    Makarand

    >-----Original Message-----
    >I find the best one to use is the Convert class. Its got

    plenty of
    >overloads for Converting practically any type into

    another, and these are
    >all static. example:
    >string refNumber = "12312";
    >int curRef = Convert.ToInt32(refNumber);
    >
    >see
    >http://msdn.microsoft.com/library/default.asp?

    url=/library/en-
    us/cpref/html/frlrfsystemconvertclasstopic.asp
    >
    >Janaka
    >
    >"Makarand" <> wrote in

    message
    >news:06cb01c3a36a$ac6c5eb0$...
    >> Hi
    >>
    >> Can anybody tell me how to use TypeConvertor class?
    >>
    >> Thing is i want to do dynamic(during runtime) type

    casting
    >> in my code.
    >>
    >> Thnanx
    >>
    >> Makarand

    >
    >
    >.
    >
    Guest, Nov 5, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hiwa
    Replies:
    2
    Views:
    419
    Tony Morris
    May 7, 2005
  2. E11
    Replies:
    1
    Views:
    4,736
    Thomas Weidenfeller
    Oct 12, 2005
  3. Toke H?iland-J?rgensen
    Replies:
    10
    Views:
    642
    Toke H?iland-J?rgensen
    Jan 1, 2004
  4. christopher diggins
    Replies:
    16
    Views:
    745
    Pete Becker
    May 4, 2005
  5. Joseph Turian
    Replies:
    5
    Views:
    585
Loading...

Share This Page