厂址:http://www.cnblogs.com/yunfeifei/p/4165351.html 1.在C#中将图片转化成base64字符串: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace ConvertImgToBase64 { class Program { static void Main(string[]
form1 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System
最近在项目中遇到个问题,需要将表中某列字段合并成字符串输出,如果直接通过代码全部读取出来,再遍历进行拼接显然不是最好的方法,所以想着能否在数据读取的时候直接拼接好返回,网上搜了可通过for xml来实现. 首先,准备好需要的数据,脚本如下: if exists (select * from sysObjects where id=object_id('Student')) drop table Student go create table Student ( Id int, Name ) )