4 min

LINQ and ArcObjects

Explores using LINQ with ArcObjects by exposing ArcGIS features as IEnumerable<IFeature>, including deferred execution, feature cursors, recycling considerations, custom enumerators, unit testing, and performance trade-offs.

Development
2 min

"Failure has occurred while loading a type."

Troubleshooting the .NET error 'Failure has occurred while loading a type' in a COM+ assembly, tracing it to stale registry permissions and resolving it by removing the problematic CLSID keys and running Visual Studio with administrative privileges.

Development
2 min

InternalsVisibleTo, PublicKey and PublicKeyToken

How to use InternalsVisibleTo with strong-named .NET assemblies, including signing the test assembly and specifying the full public key instead of the public key token.

Development
1 min

Template Method Pattern and constructors

Why calling an abstract or virtual initialization method from a C# base-class constructor triggers the 'Virtual member call in constructor' warning, and when this Template Method-style approach can be safe.

Development
2 min

Let ReSharper and Code Contracts work together

How to make ReSharper understand .NET Code Contracts such as Contract.Requires by extending its external annotations and eliminating false nullability warnings.

Development
2 min

Alternatives for the Snippet Compiler

A look at alternatives to the discontinued Snippet Compiler for compiling C# snippets and preserving syntax highlighting.

Development
2 min

Experiences with the new Add-In concept of ArcGIS 10

Notes on ArcGIS Add-In limitations and packaging, including component namespaces, adding unreferenced assemblies as AddInContent, PDB handling, and extending the table context menu with buttons.

Development
2 min

Event Naming Guidelines

A summary of .NET event naming guidelines and conventions for event handlers, EventArgs classes, pre- and post-events, and overridable OnXxx methods.

Development
3 min

Verwenden von partiellen Klassen für COM-Belange

Wie sich COM-Belange in ArcObjects mit partiellen C#-Klassen, VsCommands und ReSharper sauberer separieren lassen und warum dies eine bessere Strukturierung als #region ermöglicht.

Development
3 min

Integrate NUnit in Hudson CI-server

How to automate NUnit tests with consistent naming, a Windows batch runner, test categories, XML result files, and Hudson CI test reporting.

Development
2 min

Integrate Simian in Hudson CI-server

How to integrate Simian duplicate-code detection into Hudson CI, configure C# file exclusions and thresholds, generate XML reports, and prevent code duplication findings from breaking the build..

Development
2 min

My own set of SuppressMessage-lines

A collection of StyleCop and FxCop SuppressMessage examples for common code analysis issues, including naming, IoC, testing, exceptions, documentation, strong names, and framework-specific cases.

Development
1 min

Wie spricht man den Lambda-Operator aus?

Verschiedene englische und deutsche Formulierungen zur Aussprache und Beschreibung des Lambda-Operators in C# und von Lambda-Ausdrücken.

Development
1 min

Casting Anti-Pattern

C#-Tipps für ArcObjects: unnötige doppelte Casts mit is und explizitem Cast vermeiden sowie Next()-Schleifen kompakter und verständlicher formulieren.

Development
1 min

Catching COM-Exceptions from ArcObjects

How to catch COMException errors from the ArcObjects library in C#, inspect their error codes, and identify specific ArcObjects error constants.

Development
1 min

Compiler-Error: error MSB3217

How an orphaned assembly in the GAC can cause the misleading MSB3217 'Cannot register assembly' build error and why removing stale dependencies solves it.

OS
1 min

Using images and cursors in resources

Use strongly typed image and cursor resources in .NET applications to catch missing or renamed resources earlier and avoid fragile runtime lookups.

C#
2 min

Multilanguage with C#

How to localize C# applications with .NET resource files, satellite assemblies, ResGen.exe, AL.exe, and a post-build process for multiple languages.

Development
3 min

Mapping <Any>-Elements in BizTalk-Orchestrations

Shows how to map XML Any elements in BizTalk orchestrations using XmlDocument.ImportNode, serializable XML helper classes, namespace managers, and a Message Assignment shape.

BizTalk