Ever thought of how to capitalize the first letter of every word in a string? Here's how: [C#] using System; using System.Globalization; namespace KeithRull.CapitalizingLetters { internal class Program { static void Main( string [] args) { string textToTransform = "keith, you need to post more...
im curious of what are the preferences of developers . i can recall some friends sharing their experiences on interviews answering questions like " why C# not VB ?" or vice versa . im a c# guy and i love the language . but i dont know what language do you prefer . i know they make use of the...
Somebody sent me an email today asking me about an article I wrote a few years ago detailing how to generate random strings and numbers in C# and VB.NET . He asked me if I could add function to the code that creates a random character set to be used as a base for the allowed characters in the random...
In my early years of college as a CS student I learned about short-circuit evaluation . Short-circuit evaluation denotes that the second argument is only evaluated if the first argument does not suffice the value of the expression. I found out that short-circuit evaluation in C# is different from VB...
In the most basic case, the Hashtable class is used to do mapping of key/value pairs of objects. For example, assume that you have User ID mapped to User's Fullname: Hashtable users = new Hashtable(); users["001"] = "Marasigan, Raimund"; users["002"] = "Marasigan...
"Combine. Merge. Join. Append. Concatenate. Microsoft Word Documents." A few weeks ago I wrote an article about merging word documents in C# and got great response about the article. One of the readers, Abhi, had an interesting problem. The application he wrote was throwing this error: Word...
Access modifiers allows you to control how the elements of your application are accessed. Access modifiers are keywords such as Public, Private, Protected, Friend, and Protected Friend in VB.NET (public, private, protected, internal, protected internal in C#). For member variables with no access modifiers...