- September 23, 2004
A large subject like DF needs a few posts. My generalized plan to lay it out will start by describing the CLR's Dispose pattern, how our DF pattern works, and finally how the two patterns fit together. The CLR's Dispose patterns can be quite confusing. It took me a while to get my mind around Dispose() and Dispose(bool), and I'm still not sure I fully understand it. But, I'm going to take a crack at it. Most of what I know about DisposeFinalize patterns comes...
http://blogs.msdn.com/arich/archive/2004/09/23/233683.aspx
- September 13, 2004
Reader Andy Neilson writes in with another bug: The current compiler implementation has some problems. If the variable is a field of this, then the compiler will die. For example: class MyClass public: int i; void Foo() array<int> x = 1, 2, 3; for each (i in x) if (i == 2) break; ; This is also a bug. I'll file it in our bug tracking database. I'm not sure what the...
http://blogs.msdn.com/arich/archive/2004/09/13/228898.aspx
- September 9, 2004
Reader Rob Walker asks: Is there a neat way of handling dictionaries I have a Dictionary<Guid, Object> and want to iterate over the values. Currently I have to use the syntax: for each(KeyValuePair<Guid, Object> v in dict) v.Value ... I can't find an invocation that would allow for each (Object v in dict->Values) (This is using the Whidbey beta 1 compiler refresh). I imagine, Rob, that you're getting what I'm getting from the compiler, which is: ...
http://blogs.msdn.com/arich/archive/2004/09/09/227557.aspx
- September 8, 2004
For Each I won't go into a huge justification - suffice to say, there are some instances where it is nice to be able to iterate over a set, and perform operations on each member of that set. A good primer might be the MSDN node on C foreach. A basic sample. If you're familiar with C++ for statements or the C foreach statement, the C++ for each statement should be fairly familiar. I'll steal from a C sample, and convert to C++: using namespace System; int main() ...
http://blogs.msdn.com/arich/archive/2004/09/08/227139.aspx
|
|