Browse by Tags

All Tags » c# (RSS)

Alternating colors on DropDownList, ListBox and other ListControl.

My former colleague asked me if it is possible to attach an alternating color to a DropDownList control, similar with the GridView’s alternating rows. I found out that you can achieve that, by setting the background-color of the ListItem using “style”...
Posted by n.ocampo | with no comments
Filed under: , , ,

System.IO.Directory.GetFiles() does not support multiple search pattern

I have a task that will delete files in a certain directory, specifically a file with “*.csv” and *.log” extensions. Unfortunately System.IO.Directory.GetFiles(string,string) doesn't support multiple search pattern. To be able to...
Posted by n.ocampo | 3 comment(s)
Filed under: ,

Short-circuit evaluation in C# and VB.NET

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...
Posted by n.ocampo | 7 comment(s)
Filed under: , ,