| | |
What's the diference between STRUCTS and OBJECTS in C#??
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
A struct defines a value type; a class defines a reference type.
A value type is one whose values cannot be separated from the variable. If you try copying it to a different variable, you'll make a complete copy. You don't really modify value types -- you modify the variables that contain them.
Compare this with class types, where variables contain references that point to objects -- where two variables of that type may contain references that point to the same object.
A value type is one whose values cannot be separated from the variable. If you try copying it to a different variable, you'll make a complete copy. You don't really modify value types -- you modify the variables that contain them.
Compare this with class types, where variables contain references that point to objects -- where two variables of that type may contain references that point to the same object.
![]() |
Other Threads in the C# Forum
- Previous Thread: Get index of an enum by value
- Next Thread: Snippet - My first app - Opinions? Suggestions?
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access algorithm array barchart bitmap box buttons c# chat check checkbox class client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees draganddrop drawing encryption enum event excel file files form format forms ftp function gdi+ httpwebrequest image index input install java label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml






