When working with files it is typically to encounter the need to create a file path from two different strings. The basic way of doing this is to use a conditional statement and string concatenation. However, this is not recommended as it relies on system assumptions, like the directory separator character and that the paths … Continue reading Combining Directory Paths
String concatenation and int indirect cast – Part 2
In the previous section it was discovered that the ToString() method creates a new string. In this section the inner studies of ToString() are taken one step further in analyzing what implications the ToString() method has on string concatination. Test Scenario 3: Let’s modify the test in Test Scenario 1 in a way that this … Continue reading String concatenation and int indirect cast – Part 2
String concatenation and int indirect cast
Most programming languages provide the indirect conversions from numeric datatypes to string. So what difference it makes by calling the ToString() method when appending non-string datatypes to a string. This article is divided into 2 parts. The first part will show how the ToString() is interpreted by the CLR when it is called on an … Continue reading String concatenation and int indirect cast