value-type
.NET Parameter passing - by reference v/s by value
I\'m trying to validate my understanding of how C#/.NET/CLR treats value types and reference types. I\'ve read so many contradicting explanations I stil[详细]
2022-12-17 03:46 分类:问答In C# are the terms "Primitive" and "Literal" interchangeable?
A discussion earlier today led me to question whether or not my understanding of primtives and literals is correct.[详细]
2022-12-16 04:54 分类:问答-
Returning a value type from a property
I\'m getting confused with what happens on the stack and heap in respect to value type properties in classes.[详细]
2022-12-15 15:03 分类:问答 Using Closures to keep track of a variable: Good idea or dirty trick?
Ok, i have a need to be able to keep track of value type objects which are properties on another object, which cannot be done without having those properties implement an IObservable interface or simi[详细]
2022-12-15 07:30 分类:问答Is copying performed when capturing a value-type into a lambda?
struct SomeStruct { public int Num { get; set; } } class Program { static Action action; static void Foo() { SomeStruct someStruct = new SomeStruct { Num = 5 };[详细]
2022-12-15 06:58 分类:问答The stack is an implementation detail, or not?
According to http://msdn.microsoft.com/en-us/library/ms229017.aspx, value types "are allocated on the stack or inline with other structures*". Yet in the stack is an implementation detail, E[详细]
2022-12-14 20:17 分类:问答Layout of .NET value type in memory
I have the following .NET value types: [StructLayo开发者_JS百科ut(LayoutKind.Sequential)] public struct Date[详细]
2022-12-14 01:13 分类:问答Teaching References in C#
In a couple of weeks, I\'ll be teaching a class of first-year engineers the salient points of references 开发者_C百科in C# as part of their first-year programming course.Most of them have never progra[详细]
2022-12-09 15:59 分类:问答Is it possible to change the default value of a primitive data type?
I recently created a generic Matrix<T> class that acts as a wrapper around a List<List<T>> collection. As far as I can tell, this class is working perfectly. I am running into a slig[详细]
2022-12-09 06:29 分类:问答Definitions of "primitive", "value type", "struct", "class", "wrap" in Java and C#
I have been trying to understand the use of \"primitives\" in Java and C# and the difference between them (if any). I have asked a series of questions on SO and some of the answers seem to confuse the[详细]
2022-12-09 04:49 分类:问答