Contents tagged with .net
-
An attempt was made to load a program with an incorrect format
Could not load file or assembly 'NameOfAssemblyGoesHere' or one of its dependencies. An attempt was made to load a program with an incorrect format.
This message being spewed- …
-
Exclude SCC / VSSSCC files from Web Setup Projects
The structure of a Web Setup Project (.vdproj) file is just plain strange as it's "kinda" like XML but with curly braces ( { and } ) and quotes instead of < and > symbols.Go figure.
If you have a …
-
Formatting a number to be zero-padded
int i = 3;string padded = string.Format("{0:5D", i);
Gives a value of "00003" as the string called "padded" - that simple.
-
Reflecting on Excel
Gabhan Berry has some really interesting (and potentially useful!) stuff that mainly centres around programming with Excel. One of the most interesting entries is one regarding dealing with Optional …
-
Describing ASP.net Control properties declaratively
One of the beauties of the ASP.net system is the way you can declaratively describe controls that sit on the page, and also the contents of collections that they contain as properties, as shown as an …
-
Getting the values from a Datatable column
I couldn't find any better, reusable way to get all the values from a specific column of a datatable, strongly typed than the snippet below:
internal class DataColumnConverter<T> { …
-
Obtaining the string value of an enumeration name
A useful trick I've picked up recently is the ability to get the name of a value of an enumeration in C#. Using the following example enumeration:
enum fruit{ apples, pears, oranges}
The …