Fast Greyscale using unsafe code in C#
9
Set the read-only attribute of a file to true or false.
-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.
-8
A function to determine if the input filename is valid on Win32 platforms (that is, it does not include invalid characters, such as :\?...)
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.
10
This snippet allows an aspx page (c#) to accept URL parameters to allow styles or script to be dynamically appended to the rendered page.
I wrote this simple snippet to allow one of our vendors to accept a style override so that their application would morph into something more closely resembling our own portal application. Please see screenshots for clarification.
Original Vendor Application
Vendor Application with Style Override via URL
I wrote this simple snippet to allow one of our vendors to accept a style override so that their application would morph into something more closely resembling our own portal application. Please see screenshots for clarification.
Original Vendor Application
Vendor Application with Style Override via URL
7
This little number will allow the contents of other pages to be included or embedded into the rendered HTML of an aspx page. Using the WebClient class from the .NET framework, you can conditionally load pages, even manipulate the HTML before it is rendered and in this example, fill in forms and execute javascript actions.
The following example shows how to auto-login to an Exchange Server - this was something requested for inclusion into our portal, but I left out the logic that pulls/decrypts the real password - for obvious reasons.
Enjoy!
~Jeremy
The following example shows how to auto-login to an Exchange Server - this was something requested for inclusion into our portal, but I left out the logic that pulls/decrypts the real password - for obvious reasons.
Enjoy!
~Jeremy
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.'
-11
Example that shows how to populate a winforms combobox with csharp. It uses Data Access blocks (SqlHelper).
13
First Example of reading an excel file. Just reading the file and loop throught 10 rows.
I will send the second example soon !!!
I will send the second example soon !!!
11
Second example of reading an excel file. Reading with a SELECT syntax.









