Archive for the ‘C#’ Category
Posted by jpluimers on 2014/12/02
Last year’s summer, I posted some .NET/C#: some starting posts on the yield keyword and mentioned that async and await might be the most complicated compiler transform.
So here are some posts to learn more about async and await: Read the rest of this entry »
Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 5.0, Development, Jon Skeet, Software Development | 1 Comment »
Posted by jpluimers on 2014/12/01
Via Best C# Article of October 2014 Nicolas Dorier – NBitcoin I learned that dthorpe (yes, that is indeed Danny Thorpe many people know him from the Delphi, C# and Google world) is active as Contributors to NicolasDorier/NBitcoin and on quite some Bitcoin related repositories.
When we met last summer, he was visiting the Bitcoin 2014 conference in Amsterdam. It is really good to see his activity, and I really hope his Opex.io venture (see his LinkedIn profile) will take off, as his ideas are sound.
–jeroen
Posted in .NET, Bitcoin, C#, Cryptocurrency, Delphi, Development, History, Power User, Software Development, Windows Azure | 3 Comments »
Posted by jpluimers on 2014/11/04
Normally you would not want to use a reserved word as an identifier. But sometimes it can be very convenient, for instance for a code generator that wraps remoting calls or does ORM.
Both Delphi and C# have an escape for this:
The prefixes are to tell the compiler knows you really know what you are doing, and are using a reserved word as an identifier.
The cool thing: in the Run Time Type Information (Delphi) or Reflection (C# and VB.NET) you will see the names without the prefix.
Some examples from StackOverflow: Read the rest of this entry »
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Conference Topics, Conferences, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Event, Jon Skeet, Software Development, VB.NET, VB.NET 10.0, VB.NET 11.0, VB.NET 7.0, VB.NET 7.1, VB.NET 8.0, VB.NET 9.0 | Leave a Comment »
Posted by jpluimers on 2014/09/25
If you are going to do test driven development and unit testing, you should watch these videos and slide decks, most of them by Miško Hevery:
- Not a video, but a good starter: Guide: Writing Testable Code (or read the PDF version).
- 0:32:07 ▶ “The Clean Code Talks — Unit Testing” – YouTube.
- 0:37:56 ▶ The Clean Code Talks – Don’t Look For Things! – YouTube. Read the rest of this entry »
Posted in .NET, Agile, C#, Delphi, Development, Java, Java Platform, JavaScript/ECMAScript, Pascal, Scripting, Software Development, Unit Testing, VB.NET | 2 Comments »
Posted by jpluimers on 2014/09/09
Bosak posted an interesting piece of code on StackOverflow last year. His particular code was in C#, but it does not matter what kind of compiler you use:
Sometimes a compiler will complain about unreachable code, for instance when it thinks a function never returns a value.
But you know the program logic does.
Simple solution: When you have code that never should be reached: throw an appropriate exception.
public static int GetInt(int number)
{
int[] ints = new int[]{ 3, 7, 9, int.MaxValue };
foreach (int i in ints)
if (number <= i)
return i;
return int.MaxValue; //this should be unreachable code since the last int is int.MaxValue and number <= int.MaxValue is allways true so the above code will allways return
}
The last return could be replaced like this, as proposed by Matt Houser: Read the rest of this entry »
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/08/14
Posted in .NET, .NET 4.5, C#, C# 4.0, C# 5.0, C# 6 (Roslyn), Cloud Development, Development, Software Development, Visual Studio 2013, Visual Studio 2014, Visual Studio and tools, Windows Azure | Leave a Comment »
Posted by jpluimers on 2014/07/10
In case I need to export DocX in .NET again: DocX – Home which is also at github.com/WordDocX/DocX
(I did it both with Word Automation and OOXML, they were a pain).
–jeroen
Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 4.0, C# 5.0, Development, Office, Office 2007, Office 2010, Office 2013, Office PIA, Software Development | Leave a Comment »
Posted by jpluimers on 2014/07/02
I only need it every once in a while, so finding the right links and tips to help me usually takes too much time.
So here is a small list to get started:
Keywords: CLR, SOS.DLL, WinDbg, mscordacwks.dll, PSSCOR4
Some tips: Read the rest of this entry »
Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Debugging, Development, Software Development | Leave a Comment »