MySql.Data.MySqlClient.MySqlPacket.Write C# (CSharp) Method

Write() public method

public Write ( byte bytesToWrite ) : void
bytesToWrite byte
return void
    public void Write(byte[] bytesToWrite)
    {
      Write(bytesToWrite, 0, bytesToWrite.Length);
    }

Same methods

MySqlPacket::Write ( byte bytesToWrite, int offset, int countToWrite ) : void

Usage Example

Esempio n. 1
0
        /// <summary>
        /// Sets the current database for the this connection
        /// </summary>
        /// <param name="dbName"></param>
        public void SetDatabase(string dbName)
        {
            byte[] dbNameBytes = Encoding.GetBytes(dbName);

            packet.Clear();
            packet.WriteByte((byte)DBCmd.INIT_DB);
            packet.Write(dbNameBytes);
            ExecutePacket(packet);

            ReadOk(true);
        }
All Usage Examples Of MySql.Data.MySqlClient.MySqlPacket::Write