I did it. I read a thousand page (well, 995 pages with a six page Preface) reference manual on C# 4.0! Since I've been reading it everyone has started using C# 4.5 and I've had four different jobs. I was obsessed with reading this book in 2012 and managed to read 700 of the pages before 2012 ended, but this year I've really been burnt out and have been reading at a rate of a page a day. The last quarter of the book is on threading and various patterns for safely locking objects that multiple threads will use. I was pretty checked out in reading that stuff. There is surprisingly another quarter of the book which is on XML stuff. (transforming XML, serializing types to XML, etc.) The other half of the book which was the not the quarter on threading nor the quarter on XMLing was really, really good however. Now I can really said I've read something, though I think one of the lessons from this is not to read a thousand page tomb again. I am much stronger for it. Congratulations to Joseph and Ben Albahari for writing the informative: C# 4.0 in a Nutshell! They are smart men to say the least. Here is what I've learned:
- Encapsulation in contrast to the Open/closed Principal
- M magic for decimal creation
- default values for value types in an array
- bottleneck through parent
- virtual and override
- casting a child class to a parent interface
- delegate example
- Func example
- use Action instead of Func when you wish for a Func to return nothing
- multicast delegate example
- closures
- = () =>
- events
- Math.Pow
- Put methods in a class that require casting to an interface to use!
- how getsetters reflect
- user interface technologies
- DateTimeOffset
- using IFormatProvider and ICustomFormatter
- using string.Format with flags enums
- set the culture of the current thread
- Tuples
- Process
- predicates
- Array.ConvertAll shows off the power of delegates
- type-changing across .Select
- lazy execution of IEnumerable
- expression trees
- query from one IEnumerable type collection to another
- .AsEnumerable()
- .AsQueryable()
- Upcast to an Interface!
- Cross Join Queries and Non-equi Join Queries
- expressions in C#
- Skip and Take
- Join/Distinct/Union/Structs/lookups
- Intersect/Union/Except
- SelectMany
- let
- LINQ to XML
- XML, XPath, and XSD
- XSLT
- IDisposable
- using
- Code Contracts
- Contravariance
- where T : Whatever
- File I/O
- Networking Cheat Sheet
- remoting
- the GAC has priority over the bin
- instance method
- the parameterless constructor on a base class is always called
- attributes
- use dynamic to add nonspecific types in C# 4.0
- use dynamic to cherry pick more specific types
- visitor pattern
- dynamic method calls
- static state
- unmanaged code and the C# extern keyword
- #if(!DEBUG)
- encrypt and decrypt
- signature versus public key handshake
- finalizers
- threading
- write your own equality comparisons
- spinning
- why use PLINQ?
- why not use PLINQ?
- asynchronous methods
- MarshalByRefObject
- unsafe
- fixed
- handing in delegates to APIs
- COM
- regular expressions
- conclusion
Addendum 1/25/2014: Please see this as it turns out the post you are looking at is not the last post on C# 4.0 in a Nutshell.
Addendum 3/14/2014: My reference to C# 4.5 should really be a reference to the ASP.NET 4.5 Framework which uses C# 5.0.
Addendum 6/2/2014: This is yet another blog entry after I thought I was done blogging of C# 4.0 in a Nutshell.
Addendum 6/24/2014: This is still yet another blog entry.
Addendum 3/1/2015: Yet again!
No comments:
Post a Comment