在写c#程序时,string和byte[]之间的转换比较烦,在移植一些老程序时感觉很不好。我在c#中使用des和tripledes时移植一块老代码时也遇到了同样的情况。为了下次不为同样的事情烦恼,就写了下面的帮助类。
主要实现了以下的函数
代码中出现的sidle是我的网名。
/*
* @author wuerping
* @version 1.0
* @date 2004/11/30
* @description:
*/
using system;
using system.text;
namespace sidlehelper
{
/// <summary>
/// summary description for strhelper.
/// 命名缩写:
/// str: unicode string
/// arr: unicode array
/// hex: 二进制数据
/// hexbin: 二进制数据用ascii字符表示 例 字符1的hex是0x31表示为hexbin是 31
/// asc: ascii
/// uni: unicode
/// </summary>
public sealed class strhelper
{
hex与hexbin的转换
数组和字符串之间的转化
}
}
主要实现了以下的函数
代码中出现的sidle是我的网名。
/*
* @author wuerping
* @version 1.0
* @date 2004/11/30
* @description:
*/
using system;
using system.text;
namespace sidlehelper
{
/// <summary>
/// summary description for strhelper.
/// 命名缩写:
/// str: unicode string
/// arr: unicode array
/// hex: 二进制数据
/// hexbin: 二进制数据用ascii字符表示 例 字符1的hex是0x31表示为hexbin是 31
/// asc: ascii
/// uni: unicode
/// </summary>
public sealed class strhelper
{
hex与hexbin的转换
数组和字符串之间的转化
}
}