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...
I've been meaning to write this tutorial for a month now and finally i found time to write it. As you may have noticed, I have been blogging about accessing files ( here , here and here ), reading XML , and loading XML data to a GridView lately. The reason behind this is that I am preping you guys...
I've gotten this question 3 times in different flavors since last week and I've decided that it's time to post the solution in my blog. I've added comments on the code to explain what every line is doing. The code below will demonstrate how you can read the assembly information in both...
Yesterday I wrote an article explaning what var means in .NET 3.x . Today lets talk about Anonymous Types. Anonymous Types as describe by the C# 3.0 specification are tuple types automatically inferred and created from object initializers. Anonymous Types allows the new operator to be used with an anonymous...
One of the cool feature ( if used correctly ) added to .NET 3.x is Extension Methods which enables you to extend an specific type by adding your own methods to it. It's useful in cases where you want to extend a library that you dont have access to the source. To demonstrate extension methods lets...
A few days ago a forum question was posted in DevPinoy.org on how to read the values of a inside a GridViewRow and assigning them to a Label control(or TextBox) when that row is selected. I wasn't able to reply to that thread early due to time constraints with a project I had at that time but I told...
A few weeks ago I wrote an article on how to use IComparer and how it was easy it is to create a custom comparer to sort our objects. This time we'll talk creating a default sort mechanism for our objects by using IComparer's relative, the interface IComparable. We'll also be touching Anonymous Delegates...
In part 2 of our Back To The Basics Series, Keith discusses how to pass parameters to your inline SQL Statements, read a connection string from the web.config and the use of a static class for utilities. He also refactored(a little bit) our original solution to make the code more manageable. >>...
This is the first part our series about ADO.NET which is part of our Back To The Basic Series which is a series designed to teach beginners about the benefits of ADO.NET and to show how easy it is to use the ADO.NET in a short 10 to 15 minute video using Tagalog as the medium. Our idea is to start from...