Decode
AustraliaPostCustomerInformationDecoder.Decode method
AustraliaPost シンボルから顧客情報フィールドをデコードします。 NTable および CTable エンコーディングとは異なるデータ解釈に使用できます。 データはバー値の行として提供されます: 0、1、2、または 3.
public string Decode(string customerInformationField)
パラメータ | タイプ | 説明 |
---|---|---|
customerInformationField | String | ローバー値の行としてエンコードされた顧客情報フィールド: 0、1、2、または 3 |
戻り値
デコードされた顧客情報フィールド文字列
例
このサンプルは、AustraliaPostCustomerInformationDecoder を使用してデータをデコードする方法を示しています
[C#]
string[] N_Table = { "00", "01", "02", "10", "11", "12", "20", "21", "22", "30" };
public string Decode(string customerInformationField)
{
StringBuilder bd = new StringBuilder();
for (int i = 0; customerInformationField.Length > i; i += 2)
{
if (customerInformationField.Length >= i + 2)
{
string tmp = customerInformationField.Substring(i, 2);
for (int j = 0; N_Table.Length > j; j++)
{
if (N_Table[j].Equals(tmp))
{
bd.Append(j);
break;
}
}
}
}
return bd.ToString();
}