Browse by Tags
Sorry, but there are no more tags available to filter with.
-
Calculate file hash
-
A little code snippet for calculte file hash: public string CalculateHash( string file) { try { MD5 obj = MD5 .Create(); byte [] bytes; using ( FileStream fs = new FileStream (file, FileMode .Open, FileAccess .Read, FileShare .ReadWrite)) { int index...
-
A little reflection helper
-
These are 2 classes that I use for control objects properties by reflection... using System; using System.Collections.Generic; using System.Text; namespace Utils { public class ReflectionHelper { public static string GetStringPropertyValue( object obj...
-
A generic class for pagination
-
I need a class for pagination of some results.I post code maybe is useful... using System; using System.Data; using System.Configuration; using System.Web; using System.Collections.Generic; using System.Web.UI.WebControls; namespace ViewLogic{ public...
-
A generic class for serialization
-
I developed today a very simple class for serialization with generics. It supports saving serialized objects in a DB.This is code: Public Class SerializerDeserializer(Of T) Public Function Serialize(ByVal obj As T) As Byte() Dim objMemStream As MemoryStream...
-
DateTimeFormat
-
Sometimes you want to convert a specific culture date string in a DateTime, you can create a DateTime for InvariantCulture in VB.NET in this way: Dim paramvalue As Object = DateTime.ParseExact("23/11/2007", "dd/mm/yyyy", System.Globalization...