Quantcast
Channel: The Wiert Corner - irregular stream of stuff » VB.NET 9.0
Browsing latest articles
Browse All 13 View Live

Image may be NSFW.
Clik here to view.

.NET/C# – InvalidCastException for two Objects of the same type (via:...

If you ever get something similar to InvalidCastException: [A]Person cannot be cast to [B]Person. then you are (or more precise: your process is) probably loading the same assembly twice, but from a...

View Article



Image may be NSFW.
Clik here to view.

It works! Install Visual Studio 2010 AFTER Visual Studio 2012 – Stack Overflow

Never thought this would work so smoothly: Install Visual Studio 2010 AFTER Visual Studio 2012 – Stack Overflow. –jeroenFiled under: .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 2.0,...

View Article

Image may be NSFW.
Clik here to view.

Visual Studio: break on all CLR exceptions, not only the unhandled ones.

When you have a layered exception handling (for instance to translate general exceptions into domain or business exceptions, and want to control which exceptions trickle up to where), then from a...

View Article

Image may be NSFW.
Clik here to view.

.NET/C#: Igor Ostrovsky wrote a few great MSDN magazine articles helping you...

Igor Ostrovsky wrote a few very nice MSDN magazine articles. Not all of them have ended up in the list at MSDN magazine, so here is a more complete list: C# – The C# Memory Model in Theory and...

View Article

Image may be NSFW.
Clik here to view.

.net – xcopy ASP.NET / WinForms deployment: find common location to access...

StackOverflow user Joe (sorry, no last name) helped me big time by answering my question on Business logic shared by ASP.NET / WinForms: find the location of the assembly to access relative files to...

View Article


Image may be NSFW.
Clik here to view.

.NET/C#/VB.NET – Default value for generics (via: Stack Overflow)

Looking for the pesky little differences between C# and VB.NET, I stumbled over this nice question by Micah Martin on default values for generics in VB.NET as compared to C#. Actually there were 3...

View Article

Image may be NSFW.
Clik here to view.

The C language specification describes an abstract computer, not a real one –...

Interesting read: The C language specification describes an abstract computer, not a real one – The Old New Thing – Site Home – MSDN Blogs. In other words: any language that merges null behaviour in...

View Article

Image may be NSFW.
Clik here to view.

VB.NET: If you want to cast use DirectCast or TryCast; if you want to...

I’ve done quite a bit of VB.NET maintenance lately. Most of that code was riddled with CType, both for conversions and casts. Quite a bit code had Option Explicit and Option Strict Off. A lot of those...

View Article


Image may be NSFW.
Clik here to view.

Delphi, C#, VB.NET and SQL all have escapes to use reserved words as identifiers

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#...

View Article


Image may be NSFW.
Clik here to view.

.NET: case insensitive string replace without using RegEx (via: Stack Overflow)

Two ways to do a case insensitive string replace without using RegEx (which often is not a solution). Roll your own based on Fastest C# Case Insenstive String Replace – CodeProject (which works as of...

View Article

Image may be NSFW.
Clik here to view.

.NET/C#: Chaning the ForeColor of a ReadOnly/Disabled TextBox (via: Stack...

Once every while you still do WinForms work, and bump into something you hadn’t bumped into before. This time it was trying to set ForeColor = Color.Red on a ReadOnly TextBox for displaying error...

View Article

Image may be NSFW.
Clik here to view.

Inversion of Control via constructor argument passing

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...

View Article

Image may be NSFW.
Clik here to view.

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

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...

View Article

Browsing latest articles
Browse All 13 View Live




Latest Images