• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
永不言弃,简单就好
每一个付出,都有回报,永远不放弃
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  .NET源码

把ORACLE数据库中的bblob字段导成图片(C#实现)

摘要:string myOraclestr = "Data Source=" + this.textBox1.Text + ";User Id=" + this.textBox2.Text + ";Password=" + this.textBox3.Text + ";";OracleConnection conn = new OracleConnection(myOraclestr);OracleCo... 阅读全文
posted @ 2009-04-07 23:22 嘎子 阅读(485) 评论(0) 推荐(0)
在C#中生成指定长度的随机字符

摘要:/// ///得到随机字符. /// ///Length of the int. ///if set to true [boo number]. ///if set to true [boo sign]. ///if set to true [boo smallword]. ///if set to true [boo bigword]. /// public string getRandomiz... 阅读全文
posted @ 2008-12-19 09:23 嘎子 阅读(1967) 评论(0) 推荐(1)
C#中对字符串加密解密(对称算法)

摘要:/// /// 字符串加密组件 /// public class Encrypt { #region "定义加密字串变量" private SymmetricAlgorithm mCSP; //声明对称算法变量 private const string CIV = "Mi9l/+7Zujhy12se6Yjy111A"; //初始化向量 private con... 阅读全文
posted @ 2008-11-27 11:17 嘎子 阅读(2254) 评论(0) 推荐(0)
C#中文件与文件夹相关的操作

摘要:/// /// 文件有关的操作类 /// public class FileOperate { /// /// 删除文件 /// /// 文件的全路径. /// bool public bool DeleteFile(string FileFullPath) { if (File.Exists(FileFullPath... 阅读全文
posted @ 2008-11-26 00:44 嘎子 阅读(1138) 评论(0) 推荐(0)
C#程序中如何调用Windows API函数

摘要:[DllImport("kernel32.dll")] //在C#程序中使用Win32类库 public static extern bool Beep(int frequency, int duration); //使用extern来指明该函数的实际代码在别处 static void Main(string[] args) { Random random = new Rando... 阅读全文
posted @ 2008-11-25 10:41 嘎子 阅读(460) 评论(1) 推荐(0)
使 TextBox1 的 UI 可以更新

摘要:Timer timer1; int curNum; System.Threading.Thread thread; /// /// 自动增加 (使 TextBox1 的 UI 可以更新) /// /// The source of the event. /// The instance containing the event data. private void button1_Cl... 阅读全文
posted @ 2008-11-24 23:37 嘎子 阅读(320) 评论(0) 推荐(0)
C# Form中的Label标签的数字自动递增1,并能正常显示递增(不是一步到位)

摘要:Label标签显示从1到10000(递增1) for (int i = 0; i <= 10000; i++) { label1.Text = i.ToString(); this.Refresh(); Application.DoEvents(); //延时20毫秒,一般和上一条语句一起使用 } GC.Collect(); 阅读全文
posted @ 2008-11-23 00:52 嘎子 阅读(1587) 评论(5) 推荐(0)
C#如何判断一个字符串中中文和字母或数字的个数(转载)

摘要:int inum=0; int ichar = 0; int ichi = 0; string strTemp; for (int i = 0; i -1) { inum++; } else if ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU... 阅读全文
posted @ 2008-11-22 23:43 嘎子 阅读(4729) 评论(6) 推荐(0)

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3