The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for the ‘C# 5.0’ Category

Repeating characters into strings in C# and Delphi (via: .net – Best way to repeat a character in C# – Stack Overflow)

Posted by jpluimers on 2012/06/26

Switching back and forth between mainly Delphi and C#, sometimes it is hard to remember which idiom works best in each environment.

Recently, I had to dupe a lot of tab characters for some Tab-Delimited interface to an archaic system.

I remembered the Delphi idiom: use the DupeString function as about Delphi explains (yes, I know: it dupes more than just characters).

In C#, these work best for me:

Small code sample of the first way (thanks CMS):

static string Tabs(int n)
{
    return new String('\t', n);
}

–jeroen

via: .net – Best way to repeat a character in C# – Stack Overflow.

Oh BTW: I have reduced my StackOverflow presence. It looks like the success of StackOverflow made them instantiate many moderators. A lot of those moderators work under the mantra “we follow the rules strictly, and favour punishment over encouragement” (some  even talk about “changing heritage“). That’s a real pity, as I see a lot of StackOverflow users get scared by the very active downvoting, question/answer closing and even deletion of material that is in essence valuable, if it were edited up a bit. Deleting content is always bad, as it increases the link rot that StackOverflow are trying to prevent in questions/answers as per their FAQ. Links are the foundation of the web.

Alas, devoting real attention to the quality of StackOverflow requires putting real energy in it, which for some of the moderators seems to be too much to ask.

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Development, Pingback, Software Development, Stackoverflow | 5 Comments »

Direct Visual Studio 2012 RC and Windows 8 Release Preview ISO download URLs

Posted by jpluimers on 2012/06/20

Somehow many software vendors seem to make it a sport to make it hard to get download URLs.

So here is a bunch of direct download URLs for the (almost new <g>) Visual Studio 2012 RC (formerly and internally known as Visual Studio 11).

There are both ISO files (big, but convenient for offline installation).

Visual Studio 2012 (formerly VS11) ISO downloads
Edition Download page Download binary
Ultimate http://go.microsoft.com/fwlink/?LinkId=247147 http://download.microsoft.com/download/6/9/7/697096F6-4EEA-4704-AF2D-F3BAF57C7634/VS2012_RC_ULT_ENU.iso
Premium http://go.microsoft.com/fwlink/?LinkId=247144 http://download.microsoft.com/download/4/D/6/4D602B41-DFB6-4350-89CD-DC78B0C06996/VS2012_RC_PREM_ENU.iso
Professional http://go.microsoft.com/fwlink/?LinkId=247141 http://download.microsoft.com/download/0/B/2/0B29F8C6-C2C7-4187-A792-BDBAFB1802ED/VS2012_RC_PRO_ENU.iso
Test Professional http://go.microsoft.com/fwlink/?LinkId=247152 http://download.microsoft.com/download/F/A/D/FAD0D06E-A8BA-40D4-8F12-FE94A153EB85/VS2012_RC_TESTPRO_ENU.iso
Express For windows 8 http://go.microsoft.com/?linkid=9810160 http://download.microsoft.com/download/A/7/C/A7C0FFAF-E8D6-45F9-8820-0A7972DF5683/VS2012_RC_WinExp_ENU.iso

Web installers (depending on the choose install options, the total download can be a lot less than the complete ISO, but your system needs to be online during the full installation process).

Visual Studio 2012 (formerly VS11) ISO downloads
Edition Download page Download binary
Ultimate http://go.microsoft.com/?linkid=9810263 http://download.microsoft.com/download/6/9/7/697096F6-4EEA-4704-AF2D-F3BAF57C7634/vs_ultimate.exe
Premium http://go.microsoft.com/?linkid=9810243 http://download.microsoft.com/download/4/D/6/4D602B41-DFB6-4350-89CD-DC78B0C06996/vs_premium.exe
Professional http://go.microsoft.com/?linkid=9810223 http://download.microsoft.com/download/0/B/2/0B29F8C6-C2C7-4187-A792-BDBAFB1802ED/vs_professional.exe
Test Professional http://go.microsoft.com/?linkid=9810304 http://download.microsoft.com/download/F/A/D/FAD0D06E-A8BA-40D4-8F12-FE94A153EB85/vs_testprofessional.exe
Express For windows 8 http://go.microsoft.com/?linkid=9810150 http://download.microsoft.com/download/A/7/C/A7C0FFAF-E8D6-45F9-8820-0A7972DF5683/win8express_full.exe

You can find similar Windows 8 Release Preview download links here (they were distilled from the official download page, which now gives a 404 because of the atdmt link redirect is broken).

I use the x64 and x86 shortcuts for the x64 and x86 ISO links.

The Windows 8 Release Preview Upgrade Assistant also comes in handy.

The above links give a sustained transfer rate here of at least 3 megabit/second.

–jeroen

Posted in .NET, .NET 4.5, C#, C# 5.0, Development, Power User, Software Development, Visual Studio 11, Visual Studio and tools, Windows, Windows 8 | Leave a Comment »

Dodgy Coder: Coding tricks of game developers

Posted by jpluimers on 2012/04/26

Some very interesting tips from game development that apply juts as well to general software development.

On code health:

Now I always try to dig right down to the root cause of a bug, even if a simple, and seemingly safe, patch is available. I want my code to be healthy. If you go to the doctor and tell him “it hurts when I do this,” then you expect him to find out why it hurts, and to fix that.

Though tools like SourceMonitor can help you track your code health, the best tool is between your ears.

–jeroen

via: Dodgy Coder: Coding tricks of game developers.

Posted in .NET, Batch-Files, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Delphi x64, Delphi XE2, Development, JavaScript/ECMAScript, PHP, PowerShell, Scripting, Software Development | 1 Comment »

WTF C# code of the month

Posted by jpluimers on 2012/03/14

When I come across code like this, I’m always astonished:

			catch(Exception ex)
			{
				string strMess = ex.Message;
			}

What was the person thinking when he wrote this? Did he get distracted and nobody else notice this before checking it into their version control system?

In the same module:

		private string ToString(object myVal)
		{
			try
			{
				if (myVal != System.DBNull.Value)
					return myVal.ToString().Trim();
			}
			catch{}

			return "";
		}

–jeroen

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »

Anyone with a C#, Delphi or FreePascal implementation of the PRESENT Ultra-Lightweight Block Cipher encryption?

Posted by jpluimers on 2012/03/06

A short while ago a paper got published on PRESENT: An Ultra-Lightweight Block Cipher by Andrey Bogdanov et al becoming ISO standard 29192-2:2012.

Is there anyone that has a C#, Delphi or FreePascal implementation with unit tests?

–jeroen

Posted in .NET, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Development, Software Development | 13 Comments »

What’s new in .NET Framework 4.5? [poster] (via Heikniemi Hardcoded)

Posted by jpluimers on 2012/02/14

What’s new in .NET Framework 4.5? [poster] (via Heikniemi Hardcoded)I love the “Async ja Await equal to C#” in the picture and the copy-paste re-use in this blog entry from msguy.

Jouni Heikniemi originally posted “What’s new in .NET Framework 4.5 [poster]” on 20111029, then updated the poster on 20111116.

His original poster is Finnish, and his English poster contains a small translation glitch “Async ja Await equal to C#” (“ja” is Finnish for “and”).

Both posters are PNG filess, so msguy Anil made it into a textual document, including the translation glitch.

I love that, as it shows we are all humans :)

–jeroen

via: Bruno Leonardo Michels – Google+.

Posted in .NET, .NET 4.5, C# 2.0, C# 5.0, Software Development | 4 Comments »