<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/c-sharp/tags/class</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sat, 25 May 2013 12:00:23 GMT</pubDate>
<item>
<title>(C#) DataBase Coonection Class - rodrigoallves</title>
<link>http://snipplr.com/view/68262/database-coonection-class/</link>
<description><![CDATA[ <p>Simple Class Connection for use in C# Code.

Methods:

- ReturnDataTable(string strQueryCommand)

- ReturnDataSet(string strQueryCommand)
 
- ExecuteQuery(string strQueryCommand)

- ReturnDataReader(string strQueryCommand)</p> ]]></description>
<pubDate>Sun, 11 Nov 2012 08:23:52 GMT</pubDate>
<guid>http://snipplr.com/view/68262/database-coonection-class/</guid>
</item>
<item>
<title>(C#) Disable Event Firing anywhere SharePoint 2010 - nickaranz</title>
<link>http://snipplr.com/view/57777/disable-event-firing-anywhere-sharepoint-2010/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 12 Aug 2011 04:55:50 GMT</pubDate>
<guid>http://snipplr.com/view/57777/disable-event-firing-anywhere-sharepoint-2010/</guid>
</item>
<item>
<title>(C#) AbstractClassExample - BrentS</title>
<link>http://snipplr.com/view/57314/abstractclassexample/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 29 Jul 2011 08:36:15 GMT</pubDate>
<guid>http://snipplr.com/view/57314/abstractclassexample/</guid>
</item>
<item>
<title>(C#) System Object extensions for easier conditionals (Extending Base Object Types) - bryanlyman</title>
<link>http://snipplr.com/view/53894/system-object-extensions-for-easier-conditionals-extending-base-object-types/</link>
<description><![CDATA[ <p>.net 3.0+, To create stability in your code, you must check all inputs into a method to make sure they are valid . Often people overlook this step because of laziness, or because they aren't convinced that exceptions and assertions are actually in place to help you instead of cause you a headache. Here are some extensions which can be used to enhance the System.Object class so that their methods are global to all classes; this makes input checking effortless. This is also somewhat generic in nature because the extensions take no class type in to account before they are called, but we can use type checking to perform different boxing (casting) operations.  Sadly this cannot be done in VB.net because late binding restrictions do not allow the Object class to be extended (See my VB.Net example for further information).</p> ]]></description>
<pubDate>Sat, 21 May 2011 02:48:17 GMT</pubDate>
<guid>http://snipplr.com/view/53894/system-object-extensions-for-easier-conditionals-extending-base-object-types/</guid>
</item>
<item>
<title>(C#) Constructing Generics Through Reflection (List of Mixed Types Example) - bryanlyman</title>
<link>http://snipplr.com/view/33857/constructing-generics-through-reflection-list-of-mixed-types-example/</link>
<description><![CDATA[ <p>.net 2.0+ Generic classes make code size much smaller and casting objects (boxing) a cinch. However, currently there are some unsupported IDE options when trying to cast objects to and from generic objects that use mixed object types (inherited from a generic type specifier). Fear not, using reflection we can bypass the IDE and supply the users with strongly typed objects.</p> ]]></description>
<pubDate>Tue, 04 May 2010 16:58:15 GMT</pubDate>
<guid>http://snipplr.com/view/33857/constructing-generics-through-reflection-list-of-mixed-types-example/</guid>
</item>
<item>
<title>(C#) Enum Limitation Fix Using a Generic Class and Implicit Casting - bryanlyman</title>
<link>http://snipplr.com/view/24778/enum-limitation-fix-using-a-generic-class-and-implicit-casting/</link>
<description><![CDATA[ <p>For .net 2.0+   The one limitation to enumerations is revealed when you try to reverse lookup an enumeration value using Enum.Parse(). The parse function will return an inconsistent enum object if ever there are two or more enumerations with the same numeric value. This class fixes that problem. Written as a system extension and using implicit casting, the process has been made extremely easy and made the syntax for the parse function even simpler. The process even allows enumeration names starting with a number or the name of a C# keyword as long as the name is preceded by an underscore. The implicit cast from an Enum object to a Enum.Cast object has been deliberately left out to account for single directional assignment, which forces the class to be used properly. An Enum to Cast object lookup would defeat the whole purpose of the class if the implicit operator is used during runtime; for this purpose a user assignment operator of type String is supplied. This simply forces the user to use Cast = Enum.ToString() to parse to a correct object. The ToString() overload for a Cast object returns a Friendly name which replaces all underscores with spaces and even allows double underscores for commas and triple underscores for periods; for this reason, the implicit \"from string\" caster also converts from a friendly name to the proper Enum object. This makes it very handy for enumerating through a list of items for a combo or list box and converting back to the proper object by simply supplying the name of the list item.</p> ]]></description>
<pubDate>Mon, 14 Dec 2009 18:03:38 GMT</pubDate>
<guid>http://snipplr.com/view/24778/enum-limitation-fix-using-a-generic-class-and-implicit-casting/</guid>
</item>
</channel>
</rss>