Marko Apfel - Afghanistan/Belgium/Germany

Management, Architecture, Programming, QA, Coach, GIS, EAI

  Home  |   Contact  |   Syndication    |   Login
  169 Posts | 2 Stories | 138 Comments | 4 Trackbacks

News



Twitter | LinkedIn | Xing

Article Categories

Archives

Post Categories

BizTalk

C#

Enterprise Library

SAP

SQL Server

Technologie

November 2008 Entries

Often i see code-constructs like 1: try 2: { 3: string bitmapResourceName = GetType().Name + ".bmp"; 4: Bitmap bitmap = new Bitmap(GetType(), bitmapResourceName); 5: } 6: catch (Exception ex) 7: { 8: System.Diagnostics.Trace.Wr... bitmap."); 9: } The corresponding codetree has the structure: This works as so long as the bitmap is near the calling component and the names are similar. If the name of Form2 is changed (maybe through refactoring) the developer must remember, that there is ......

Offen also a simple application references some other assemblies. In those cases for a deployment all of these assemblies are needed. Instead giving the customer a bunch of all, with ILMerge you can bundle all assemblies in one. To support the merge-process in a post built step in my solution tree is a folder named Build which contains tools for the build-process. One of these tools is ILMerge: Next thing we need is a simple batch (ILMerge.bat) in the project which calls ILMerge: The ILMerge call ......

The .NET-Frameworks offers a good support for application which needs to be localizable. For each of my C#-projects i create three ressources under the properties-folder. Images.resx contains images for the application (mostly not needed to be localized, only for simple resource-access) Messages.resx contains strings of messages for users (such as contents of MessageBoxes) Resources.resx (normally created from VS by default) contains GUI-relevant stuff (such as label- and button-texts) For this example ......