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...
I'm still a big fan of VB.NET even if I haven't touched a single VB.NET code in a year and one the biggest VB.NET fanboy I know has just started a website all about the good things you can do with VB.NET. Chris Williams (VB.NET MVP) has just started a website called ILoveVB.NET . The idea is...
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...
I usually code my own authentication module in my Windows Application but since i have been playing with Web Applications lately, I thought, maybe there's a way to use the Membership API inside System.Web on my Windows Applications. So after playing and Googling around i have made it worked. Below...
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...
Loading controls is a pretty easy task, and creating them at run time is pretty simple. But how about loading them dynamically inside a control or somehow adding them on your list of child controls? Ahh, ahh, ahh, think again. Maybe it's an easier task to load them dynamically but using a Web User...
"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...
A friend asked me for help today about a segment of code that was giving him a headache. After looking at the code I immediately told him the problem. Can you spot the problem too without compiling the VB code? Why is it happening? Module Program Sub Main() Calculate() End Sub Private Sub Calculate(...
Its been weeks since my last post since I've been very busy here with some projects. I tried using VB.Net on one of my project since my Project Manager told me so because there are a few C# guys in here. I used the My.Settings feature and found out that its not getting the values from the Config file...
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...