char[] buf = new char [40]; //char[] buf = null; SqlChars chars = new SqlChars("This is a test for SqlChars.Read"); try { chars.Read(0, buf, 0, (int)chars.Length); } catch (Exception e) { Console.WriteLine("Exception type = {0}", e.GetType()); } for (int i = 0; i < 40; i++) buf[i] = Convert.ToChar (32+i+1); try { chars.Write(0, buf, 0, buf.Length); } catch (Exception e) { Console.WriteLine("Exception type = {0}", e.GetType()); }