C# Sample code from Developer Fusion https://www.developerfusion.com/t/csharp/code/sort/popularity/ C# Sample code from Developer Fusion http://www.rssboard.org/rss-specification en-GB Thu, 28 Aug 2008 11:22:00 GMT How to convert a string to a date Finding out how to convert one type to another in .NET is tricky. Here is the answer to converting a string to a DateTime type. http://www.developerfusion.com/code/3244/how-to-convert-a-string-to-a-date/ http://www.developerfusion.com/code/3244/how-to-convert-a-string-to-a-date/ Sat, 11 Jan 2003 09:53:00 GMT Edward Tanguay Making a .NET app run on Vista with Administrator priviledges If you're targeting Windows Vista and your application requires administrator priviledges (such as accessing the program files directory), then it will fail unless you include a manifest so Windows knows. Here's how. http://www.developerfusion.com/code/7987/making-a-net-app-run-on-vista-with-administrator-priviledges/ http://www.developerfusion.com/code/7987/making-a-net-app-run-on-vista-with-administrator-priviledges/ Wed, 06 Aug 2008 09:35:00 GMT James Crowley Asynchronous HttpWebRequest Demonstrates how to build a much more responsive and user-friendly application by using asynchronous HttpWebRequests. http://www.developerfusion.com/code/4654/asynchronous-httpwebrequest/ http://www.developerfusion.com/code/4654/asynchronous-httpwebrequest/ Fri, 14 Jan 2005 04:08:00 GMT Steven Cohn Adding controls to PlaceHolders dynamically A simple example demonstrating how to dynamically add controls to a PlaceHolder control. http://www.developerfusion.com/code/3826/adding-controls-to-placeholders-dynamically/ http://www.developerfusion.com/code/3826/adding-controls-to-placeholders-dynamically/ Mon, 07 Jul 2003 04:29:00 GMT Edward Tanguay Merge an .exe and a .dll into one .exe How to merge an .exe and a .dll into one .exe using ilmerge in VS.NET http://www.developerfusion.com/code/4504/merge-an-exe-and-a-dll-into-one-exe/ http://www.developerfusion.com/code/4504/merge-an-exe-and-a-dll-into-one-exe/ Tue, 02 Mar 2004 04:47:00 GMT Edward Tanguay How to check to make sure a URL is valid A neat bit of code that checks if a domain is valid and actually exists. http://www.developerfusion.com/code/4267/how-to-check-to-make-sure-a-url-is-valid/ http://www.developerfusion.com/code/4267/how-to-check-to-make-sure-a-url-is-valid/ Tue, 06 Jan 2004 06:48:00 GMT Edward Tanguay Generate PDFs using C# and the free iTextSharp library Learn how to use the free iTextSharp library to load a PDF form, populate some dynamic fields, and then save out a flat PDF file. http://www.developerfusion.com/code/6623/dynamically-generating-pdfs-in-net/ http://www.developerfusion.com/code/6623/dynamically-generating-pdfs-in-net/ Sun, 15 Apr 2007 20:36:00 GMT James Crowley User-Friendly Validation using ErrorProvider Data entry is a very important part of a lot of applications. It is important to validate data as it is entered without disturbing the user. Enter the ErrorProvider component. http://www.developerfusion.com/code/4445/userfriendly-validation-using-errorprovider/ http://www.developerfusion.com/code/4445/userfriendly-validation-using-errorprovider/ Sun, 15 Feb 2004 09:33:00 GMT Tim Dawson Deep clone an object in .NET A simple code snippet that deep-copies an object by serializing and de-serializing using the BinaryFormatter http://www.developerfusion.com/code/8063/deep-clone-an-object-in-net/ http://www.developerfusion.com/code/8063/deep-clone-an-object-in-net/ Thu, 28 Aug 2008 11:22:00 GMT James Crowley Read MP3 Tag Information (ID3v1 and ID3v2) This sample source code demonstrates how to read IP3v1 and IP3v2 tag information from MP3's, along with MPEG headers too. http://www.developerfusion.com/code/4684/read-mp3-tag-information-id3v1-and-id3v2/ http://www.developerfusion.com/code/4684/read-mp3-tag-information-id3v1-and-id3v2/ Thu, 31 Mar 2005 18:50:00 GMT Erin Jones Create Controls At Runtime Shows how to create controls at runtime and set their properties http://www.developerfusion.com/code/4393/create-controls-at-runtime/ http://www.developerfusion.com/code/4393/create-controls-at-runtime/ Wed, 04 Feb 2004 16:30:00 GMT Colin Harman MACITP Placing results from DataReader into an Array Since a connection cannot be used until a DataReader has been closed, it is quite often necessary to read the results of a DataReader into an array, then close the DataReader, then you can process the data in the array while you use the connection for something else. This shows you how. http://www.developerfusion.com/code/4390/placing-results-from-datareader-into-an-array/ http://www.developerfusion.com/code/4390/placing-results-from-datareader-into-an-array/ Wed, 04 Feb 2004 11:32:00 GMT Edward Tanguay Validating an Integer How to validate an Integer the fast/efficient way in C# using Double.TryParse() http://www.developerfusion.com/code/4650/validating-an-integer/ http://www.developerfusion.com/code/4650/validating-an-integer/ Sun, 09 Jan 2005 14:40:00 GMT Simon Soanes Generate an Image of a Web Page Demonstrates how to fetch images and thumbnails of web pages using a hidden web browser control. http://www.developerfusion.com/code/4712/generate-an-image-of-a-web-page/ http://www.developerfusion.com/code/4712/generate-an-image-of-a-web-page/ Fri, 22 Jul 2005 15:50:00 GMT Alan Dean FTP client library for C# An FTP client library for C#, including asynchronous operation http://www.developerfusion.com/code/4340/ftp-client-library-for-c/ http://www.developerfusion.com/code/4340/ftp-client-library-for-c/ Mon, 26 Jan 2004 04:25:00 GMT Dan Glass Create Hashes - MD5, SHA1, SHA256, SHA384, SHA512 In PHP its a simple task to generate hashes, but in C# it takes a little more work. We'll create a Hash class to simplify the process. http://www.developerfusion.com/code/4601/create-hashes-md5-sha1-sha256-sha384-sha512/ http://www.developerfusion.com/code/4601/create-hashes-md5-sha1-sha256-sha384-sha512/ Mon, 05 Apr 2004 05:57:00 GMT David Cumps How to access a MySQL database with .NET Demonstrates how to connect to a MySQL database with C#. http://www.developerfusion.com/code/4596/how-to-access-a-mysql-database-with-net/ http://www.developerfusion.com/code/4596/how-to-access-a-mysql-database-with-net/ Thu, 01 Apr 2004 14:47:00 GMT Edward Tanguay Double buffering in .NET Ever wondered how to double buffer with a Graphics object so your GDI+ based game/control doesn't flicker annoyingly? Here's how! http://www.developerfusion.com/code/4668/double-buffering-in-net/ http://www.developerfusion.com/code/4668/double-buffering-in-net/ Fri, 11 Feb 2005 13:59:00 GMT Simon Soanes Parse a UK Date String Ever wondered why DateTime.Parse doesn't recognise non-US date format? Here's how to get it to! http://www.developerfusion.com/code/4690/parse-a-uk-date-string/ http://www.developerfusion.com/code/4690/parse-a-uk-date-string/ Fri, 15 Apr 2005 12:11:00 GMT James Crowley XML Node Insert Someone recently asked on the Undernet #C# channel for help with inserting a block of XML into an existing XML document. After perusing a couple of MSDN articles here's what I came up with. http://www.developerfusion.com/code/3227/xml-node-insert/ http://www.developerfusion.com/code/3227/xml-node-insert/ Thu, 09 Jan 2003 09:02:00 GMT Paul Parks