Results 1 to 5 of 5

Thread: Structures Question(s)??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Posts
    217

    Structures Question(s)??

    Are the .Net primitive data types classes or structures?? Also, is a structure considered an object? Can you derive another structure from another structures? Sorry for so many questions, but my book is unclear about this topic.

  2. #2
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631
    I don't have an answer but I found this on MSDN.

    http://msdn.microsoft.com/library/de...ceapicalls.asp
    Please rate my post.

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    the data types are class objects...everything in .NET is treated as such.

    i believe yes you should be able to derive a struct from a struct.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4
    Hyperactive Member Bananafish's Avatar
    Join Date
    Jan 2001
    Posts
    394
    The type hierarchy for .net starts off with "object" at the top, under which is

    Code:
    Object
         String (note, not a primitive type)
         Array
         ValueType
              PrimitiveTypes
              Enum
              Structure 
         Exception
         Delegate
              Multicast Delegate
         Class

  5. #5
    Lively Member
    Join Date
    Aug 1999
    Location
    Amsterdam
    Posts
    117
    Primitive datatypes are value types (like structs) not reference types (like classes).

    And a struct can't be derived from another struct !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width