3
Reply

why c# structures are still useful ?

Simi Tkd

Simi Tkd

Jul 10, 2014
1.4k
0

    c# structures send object by value like basic type which reduce overhead. structure can not inheritance,static, abstract virtual methods or members . structure can have constructor but no argument constructor can't be overloaded. structure can use interfaces, operator overloading ,indexer and property. structure should be used for small object that did not inheritance

    Simi Tkd
    July 10, 2014
    2

    A struct is a value type, whereas a class is a reference type. A struct does not support inheritance (other than implicitly deriving from object). A struct can have all the members a class can, except the following: A parameterless constructor A finalizer Virtual members

    Munesh Sharma
    July 23, 2014
    1

    because its fully object oriented

    dhansukh velani
    July 23, 2014
    1