admin 管理员组

文章数量: 1086019


2024年4月20日发(作者:列表框代码)

公共类库说明

一、 :提供了实用方法的字节数组和图像之间的转换

函数说明:图像字节转换

public static Image ByteToImage(byte[] bytes)

public static byte[] ImageToByte(Image image)

函数说明:BASE64编码转换

public static Bitmap Base64StrToBmp(string ImgBase64Str)

public static string ImageToBase64Str(string ImgName)

public static string ImageToBase64Str(Image Img)

二、 : 处理数据类型转换,数制转换、编码转换相关的类

#region 各进制数间转换

public static string ConvertBase(string value, int from, int to)

#region 使用指定字符集将byte[]转换成string

public static byte[] StringToBytes(string text)

public static byte[] StringToBytes(string text, Encoding encoding)

public static string BytesToString(byte[] bytes)

#region 使用指定字符集将byte[]转换成string

/// 要转换的字节数组

/// 字符编码

public static string BytesToString(byte[] bytes, Encoding encoding)

三、 :Excel操作辅助类(无需VBA引用)

#region 获取Excel连接字符串

/// 返回Excel 连接字符串 [IMEX=1]

/// Excel文件绝对路径

/// 是否把第一行作为列名

/// Excel 版本


本文标签: 转换 字节 编码 无需 说明