Autor Beitrag
kostonstyle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Do 10.09.09 11:55 
Hallo miteinander
könnte jemand mir bitte erklären, was der Unterschied zwischen Struct und Static, ich kann darin kein Unterschied sehen, ausser das Struc in Stack ablegt wird, dagegen Static in Heap.

Gruss kostonstyle
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4708
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Do 10.09.09 12:05 
Ein Gedankenexperiment. Stell dir vor ein Basisdatentyp wie zum Beispiel Int32 wäre anstatt eines structs eine static Class. Was fällt auf? .... Du könntest in deiner Anwendung nur noch einen Int32 haben.

structs kann man (glücklicherweise) beliebig oft instanzieren eine static Klasse nicht.
kostonstyle Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 94



BeitragVerfasst: Do 10.09.09 12:57 
das stimmt, super beispiel......
vielen dank