Profile
Achievement
bryanlyman's Recent Snippets
- All /
« Prev 1 Next »
Because there is no way to use object extenders in vb.net here is an example of how you can get similar functionality. See the C# example for further info.
0
1048
posted 13 years ago by bryanlyman
.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 pl...
0
875
posted 13 years ago by bryanlyman
.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...
0
900
posted 14 years ago by bryanlyman
You must include these DLL references in your vsweb or vscode project:\r\nPresentationCore,\r\nPresentationFramework,\r\nWindowsBase. \r\nNotice how I am manipulating the RGB values of each pixel, this is the power of these classes. The Drawing class...
0
920
posted 14 years ago by bryanlyman
C#
Generic list wrapper returns a smaller strongly typed sub-list which modifies the parent-list when changed (without events)
A class which wraps a parent list containing mixed object types, to provide smaller strongly typed sub-lists of objects. These sub-lists can be modified, which then modifies the parent list concurrently (without events being triggered). Supports the...
0
844
posted 14 years ago by bryanlyman
A browser friendly way to trigger an event on an element. This is just a simple snippet which doesn\'t really explain the detailed contents of an event object, but it gives an idea of the differences between specific browsers. This function will fire...
0
1111
posted 14 years ago by bryanlyman
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...
0
1136
posted 14 years ago by bryanlyman
A way to do 100% DIVs that adjust to content and center themselves both vertically and horizontally automatically. Tested for all browsers at 1920X1080 resolution. The 96% body height fixes Firefox and IE scrollbars that appear without reason and mig...
1
855
posted 14 years ago by bryanlyman