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,708 other followers

Archive for the ‘RemObjects C#’ Category

c# – How can I create a temp file with a specific extension with .net? – Stack Overflow

Posted by jpluimers on 2016/01/27

You’d think this is a simple question.

Be amazed by the many ways leading into to creating a temporary file with a specific extension.

This list doesn’t even cover all of them:

  • Create a file name based on GetTempPath, a Guid and an extension.
  • Use the TempFileCollection from the Compiler in System.CodeDom.
  • Get a random file name, then change the extension. Loop until it is unique.
  • Use a timestamp to generate unique file names.

All via: c# – How can I create a temp file with a specific extension with .net? – Stack Overflow.

Which one would you choose?

–jeroen

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, C# 6 (Roslyn), Development, RemObjects C#, Software Development | Leave a Comment »

Unless you write an installer with the right manifest, don’t include Installer, Update, Upgrade, Setup, … in your EXE name

Posted by jpluimers on 2015/09/28

I’ve seen this question coming up a few times, and bumped into this at a client recently: the UAC dialog coming up when debugging a 32-bit executable.

This is caused (more details below) by Installer Detection Technology introduced in Windows Vista (with UAC) and tightened in more modern Windows versions.

The solution is to either:

  • not include Installer, Patch, Update, Upgrade, Setup, … in your EXE name
  • provide a correct manifest to your EXE (getting this right can be hard)
  • don’t use x86 as platform target

For software you don’t have source code for, you can alter the manifest with a requestedExecutionLevel elementFixing the way Vista Auto-detects Installers – Ben’s Writing.

A few links on Installer Detection Technology in Windows:

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, .NET CF, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Delphi, Delphi 10 Seattle, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, RemObjects C#, Software Development | 1 Comment »

Difference Between Int32.Parse, Convert.ToInt32, and Int32.TryParse – CodeProject

Posted by jpluimers on 2015/08/05

Every C#/VB/.NET developer should read Difference Between Int32.Parse, Convert.ToInt32, and Int32.TryParse – CodeProject.

Then also read TryParse with default values.

It is all about handling values that are not Integers, Overflow values and Nulls. There are subtle differences, in the handling of the methods, and the exceptions they could throw: ArgumentNullException, FormatException and OverflowException.

Finally read all about the NumberStyles enumeration, IFormatProvider interface and CultureInfo (especially the difference between InvariantCulture, CurrentCulture, CurrentUICulture and InstalledUICulture).

Because getting your conversions right matters.

–jeroen

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, C# 6 (Roslyn), Development, Mono, Mono for Android, Prism, RemObjects C#, 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 »

Inversion of Control via constructor argument passing

Posted by jpluimers on 2015/06/18

Inversion of Control example video on YouTube: business class is not in control of the DAL.

It uses C#, but the code is so simple that every programmer should be able to get it.

Uses:

  • interfaces
  • parameter passing through constructor
  • moving control decisions out of the business class

Inversion of Control (IoC) can later be amended by Dependency Injection (DI), but IoC can easily without that be used very effectively without DI.

I wish the What is…? series had more than 1 episode, but Christian Richards does have some interesting series about game development.

–jeroen

via: duidelijk voorbeeld.

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, C# 6 (Roslyn), Development, RemObjects C#, 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 »

Coding Kata videos: Bowling game

Posted by jpluimers on 2015/04/22

A long and shorter while ago, I wrote about practicing your coding and test driven development skills:

Here are some Coding Kata videos of the Bowling Game Kata in various languages and environments. Some of them are dumb (no audio) just like good practice usually is. Note: it helps to know a bit about 10 Pin Bowling Scoring rules.

And since I want to learn Haskell and have done a lot of Tic-Tac-Toe demos inthe past:

For more background information:

–jeroen

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Java, Python, RemObjects C#, Ruby, Software Development | Leave a Comment »

 
%d bloggers like this: