Skip to main content

Home/ Coders/ Group items tagged .NETGeneral

Rss Feed Group items tagged

Matteo Spreafico

stateless - A C# Hierarchical State Machine - 3 views

  • A C# Hierarchical State Machine
  • Create state machines and lightweight state machine-based workflows directly in .NET code
Matteo Spreafico

Fabulous Adventures In Coding : The Stack Is An Implementation Detail, Part One - 0 views

  • Almost every article I see that describes the difference between value types and reference types explains in (frequently incorrect) detail about what “the stack” is and how the major difference between value types and reference types is that value types go on the stack.
  • I find this characterization of a value type based on its implementation details rather than its observable characteristics to be both confusing and unfortunate. Surely the most relevant fact about value types is not the implementation detail of how they are allocated, but rather the by-design semantic meaning of “value type”, namely that they are always copied “by value”.
  • Of course, the simplistic statement I described is not even true. As the MSDN documentation correctly notes, value types are allocated on the stack sometimes. For example, the memory for an integer field in a class type is part of the class instance’s memory, which is allocated on the heap.
  • ...3 more annotations...
  • As long as the implementation maintains the semantics guaranteed by the specification, it can choose any strategy it likes for generating efficient code
  • That Windows typically does so, and that this one-meg array is an efficient place to store small amounts of short-lived data is great, but it’s not a requirement that an operating system provide such a structure, or that the jitter use it. The jitter could choose to put every local “on the heap” and live with the performance cost of doing so, as long as the value type semantics were maintained
  • I would only be making that choice if profiling data showed that there was a large, real-world-customer-impacting performance problem directly mitigated by using value types. Absent such data, I’d always make the choice of value type vs reference type based on whether the type is semantically representing a value or semantically a reference to something.
Matteo Spreafico

Qink | Free .NET Libraries - 1 views

  • The Ultimate List of Freely Available .NET Libraries
  • EPPlus is based on Excel Package and allows creation/reading of .XLSX (Excel 2007). It is actually the most advanced even comparing to NPOI.
  • LinqToTwitter - Linq-based wrapper for all Twitter API functionality in C#
  • ...1 more annotation...
  • Facebook C# SDK - A toolkit for creating facebook applications / integrating websites with Facebook using the new Graph API or the old rest API.
1 - 3 of 3
Showing 20 items per page