private void ReadSqlStringValue(SqlBuffer value, byte type, int length, Encoding encoding, bool isPlp, TdsParserStateObject stateObj) { string strEmpty; byte num = type; if (num <= 0x63) { if (num > 0x27) { switch (num) { case 0x2f: goto Label_004C; case 0x63: goto Label_006B; } return; } if ((num != 0x23) && (num != 0x27)) { return; } } else if (num <= 0xaf) { if ((num != 0xa7) && (num != 0xaf)) { return; } } else { switch (num) { case 0xe7: case 0xef: goto Label_006B; } return; } Label_004C: if (encoding == null) { encoding = this._defaultEncoding; } value.SetToString(stateObj.ReadStringWithEncoding(length, encoding, isPlp)); return; Label_006B: strEmpty = null; if (isPlp) { char[] buff = null; length = this.ReadPlpUnicodeChars(ref buff, 0, length >> 1, stateObj); if (length > 0) { strEmpty = new string(buff, 0, length); } else { strEmpty = ADP.StrEmpty; } } else { strEmpty = stateObj.ReadString(length >> 1); } value.SetToString(strEmpty); }