Type Casting.

Hello.
Could u tell me how can i use the type casting variables as we use in C++. Also how to use structurs in VB.NET.
Waiting for reply.
Thanks.

S.A.RAZA

Comments

  • : Hello.
    : Could u tell me how can i use the type casting variables as we use in C++. Also how to use structurs in VB.NET.
    : Waiting for reply.
    : Thanks.
    :
    : S.A.RAZA
    :

    C++ Structures in VB have always been called "Types":
    [code]
    typedef struct point_tag
    {
    int x;
    int y;
    } POINT, * POINT;
    [/code]

    translates as

    [code]
    Public Type Point
    x as Int32
    y as Int32
    End Type
    [/code]

    Casting operators for your objects doesn't exist in VB.NET (as far as I know). But, check your .NET docs for CInt() Function: it converts its parameter into an integer. And there are various CStr(), CDbl() and so on function for most of the data types. Can't remember which ones, though, but at least you have a clue. *LOL*
  • : Hello.
    : Could u tell me how can i use the type casting variables as we use in C++. Also how to use structurs in VB.NET.
    : Waiting for reply.
    : Thanks.
    :
    : S.A.RAZA
    :

    Ther are no TYPES in VB.NET

    Structure MyStructure
    Dim MyString As String
    Dim MyInteger as Int16
    End Structure

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories