Parsing a String for Number
4
A basic employee class
13
This snippet effectively reads an XML document using XPathDocument (read-only) instead of using the DOM. This snippet returns the full element values in between elements. For example:
root element
code element
This is a test.
/code element
/root element
GetXmlString("/root/code"); //returns 'This is a test.'
root element
code element
This is a test.
/code element
/root element
GetXmlString("/root/code"); //returns 'This is a test.'
6
Write a set of bytes into a 'so-called' binary file. The point is that we use BinaryWriter here and we have a byte array as input.
2
This function loads an File into an String.
4
This function provides the reverse of a string. It is constructed using string builder because strings in .NET are immutable, while stringbuilders are not. Therefore large strings could be slow to reverse if a regular string was used for the working value that is returned.
6
This snippet generates a secure hash string using VB.NET
5
MovingParts
One of best and unknown built in string function included in .NET is String.Split(). It has come in quite handy for my in the last 2 years that I thought I'd share. Pretty basic example here...and for my first post, I thought I'd throw in a little File IO (for free of course)! This was written in .NET 2.0 and it will take little to no modification to make it work in 1.0/1.1.
-8
A function to determine if the input filename is valid on Win32 platforms (that is, it does not include invalid characters, such as :\?...)
-9
Write a set of bytes into a so-called binary file. The point is that we use BinaryWriter here and we have a byte array as input.
9
Set the read-only attribute of a file to true or false.









