Browse by Tags
Sorry, but there are no more tags available to filter with.
-
-
When you don’t want to provide a fixed number of argument for a method, you can use the params modifier, that can handle a list of values of a single type, instead of requiring from the caller to build a list. void UseParams(params int[] list) -f. ref...
-
-
In C#, when you have a string with slash in it, you must double it to have a result of only one, because of the escape code. When starting a string with a @, you can’t insert escape code, but you do not have to double them. -f.
-
-
In opposition of a previous post, if you need to create a Array with unknow length, you can just create an ArrayList and call the ToArray() method on it. -f.
-
-
If you do not know it, you can create on-th-fly an array, without passing thru an Arraylist or other lists that as the .ToArray() method. new object[] { item, item, item} // give you an array with 3 items. -f.
-
-
For those who want to use the IIF, try the “ ? :” terminology, it is quite the same! -f.
-
-
If you are trying to create a Timespan for 30 second by creating a new Timespan(0, 0, 30); you are using the long way… Look a the static methods, like Timespan.FromSecond(30)… -f.
-
-
You do remember well the order of the carriage return and line feed? Check out Environment.Newline! -f.