-
Notifications
You must be signed in to change notification settings - Fork 6k
Added a very detailed example #7185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I decided to add a visual representation of the difference between reference types & value types. Show just how they work on the stack as well as on the heap.
Fixed a minor spelling issue.
Fixed the last minor typos.
@PtrStruct @BillWagner I have several concerns about this PR:
|
@pkulikov I did look around the msdn and after doing so, I found this article to be the most fitting one. |
Regarding @pkulikov regard I decided to edit the document splitting it up and explaining it a bit more. I personally like this one a lot more. Regarding his other concern about seeing this example else where becuase it would "fit" better there. I could unfortunately not find a better place for this example than right here
Thank you for adding this. However, as @pkulikov mentioned, there are a number of concerns. First, this example and the introduction in the article on classes and structs covers much of this information. Second, as I stated in this comment value types are "on the stack" except when they aren't. They aren't on the stack when they are members of a reference type, in an array or other collection, captured by a closure, and so on. Your explanation is correct for the cases it covers, but it is misleading by not discussing those other cases. I suggest we close this PR, you look at the classes and structs article referenced above. Then, if there is important information that you feel is lacking, submit a PR updating that topic. What are your thoughts? |
I understand, thanks. |
Thanks @PtrStruct I'll close this. |
I decided to add a visual representation of the difference between reference types & value types.
Show just how they work on the stack as well as on the heap.
Summary
Describe your changes here.
Fixes #Issue_Number (if available)