今天,用C#写程序操作Excel,读取单元格内容根据所需格式生成字符串,使用String.Format(string format,object arg0)方法。以前只知“{0}”为索引占位符(即格式项),与参数列表中的第一个对象相对应,格式设置过程将每个格式项替换为对应对象的值的文本表示形式。但这...
分类:
其他好文 时间:
2015-06-02 17:34:10
阅读次数:
116
0x0001public PackageInfo getPackageArchiveInfo (String archiveFilePath, int flags) Since: API Level 1Retrieve overall information about an application...
分类:
移动开发 时间:
2015-06-02 17:33:27
阅读次数:
328
protectedvoid Page_Load(object sender, EventArgs e){ string[] str = new string[4]; string serverCode = ""; //生成随机生成器 ...
No.6 ZigZag ConversionThe string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this patt...
分类:
其他好文 时间:
2015-06-02 17:21:25
阅读次数:
109
最近在.net中使用Sqlite数据库,发现.net的驱动做得不错,而且实现了加密功能。于是想给自己的数据库加上口令,结果,多次实验都以失败告终:链接数据库,然后ChangePassword都成功执行了,但是再次链接打开数据库则报错:“File is encrypted or is not a .....
分类:
数据库 时间:
2015-06-02 17:16:28
阅读次数:
143
JAVA获取CLASSPATH路径新手粘贴的资源ClassLoader提供了两个方法用于从装载的类路径中取得资源: public URLgetResource(String name); public InputStreamgetResourceAsStream(String name)...
分类:
编程语言 时间:
2015-06-02 17:10:09
阅读次数:
103
public partial class Form1 : Form { string str = "spp"; public string spp = "very good"; public Form1() { Initi...
public static string RsaEncrypt(string publickey, string content) { RSACryptoServiceProvider rsa = new RSACryptoServiceProvi...
分类:
其他好文 时间:
2015-06-02 16:51:15
阅读次数:
112
写程序用到istringstream和ostringstream,看了别人的博文,借鉴~~~~~~。iostream 标准库支持内存中的输入/输出,只要将流与存储在程序内存中的 string 对象捆绑起来即可。此时,可使用 iostream 输入和输出操作符读写这个 string 对象。标准库定义了...
分类:
其他好文 时间:
2015-06-02 16:48:01
阅读次数:
99
理论:C#字符串(String)在C#中,您可以使用字符数组来表示字符串,但是,更常见的做法是使用string关键字来声明一个字符串变量。string关键字是System.String类的别名。创建String对象您可以使用以下方法之一来创建string对象:通过给String变量指定一个字符串通过使用String..