Changes between Version 9 and Version 10 of ProgrammingTips


Ignore:
Timestamp:
Nov 19, 2009, 1:10:09 PM (12 years ago)
Author:
Matthäus Wander
Comment:

conditional methods

Legend:

Unmodified
Added
Removed
Modified
  • ProgrammingTips

    v9 v10  
    4343 * Avoid editing strings in loops. String objects are immutable which means that each change requires the instantiation of a new object. Use StringBuilder instead.
    4444 * Avoid plain strings as output property type to pass non-textual data. Strings may appear as general purpose data type which can be read easily by any plugin. However strings still require a custom parsing. Apart from ''not'' improving interoperability, you pay a performance penalty for the parsing expenses. Do you need a delimiter character to pass your information as string? If the answer is yes, do not use a string. Instead consider using an array, a set, a dictionary or similar.
     45 * Use the .NET Attribute [Conditional("DEBUG")] for debug methods which should not be called in the Release version. Inside a conditional method you can print a stacktrace, check debugging assertions or similar.
    4546
    4647== Review checklist ==