the convertion between string and BlobColumn

It's hard to find some samples about the convertion between string and BlobColumn.AddBlobData.

It's 太坑人了

 

1.convert  BlobColumn to string.  (Get user name from  BlobColumn type data)

  

    public override void Input0_ProcessInputRow(Input0Buffer Row)

    {

        string userName = Encoding.Unicode.GetString(Row.UserName.GetBlobData(0, Convert.ToInt32(Row.UserName.Length)));

    }

 

 

2. Convert string to  BlobColumn. (add user name to BlobColumn type)

  

    public override void Input0_ProcessInputRow(Input0Buffer Row)

    {

        Row.Out_UserName.AddBlobData(Encoding.Unicode.GetBytes(UserName));



    }

 

alert("不用谢,记得我叫迎风一刀劈就行了");

  

你可能感兴趣的:(convert)