C# Basic
weixin_43602710
这个作者很懒,什么都没留下…
展开
-
C# 连接数据库
private void ExecuteSQLScalar() { //sqlconnect must be closed after executing the SQL /*To run the SQL, must have below elements 1. SqlConnection ...原创 2018-12-21 17:37:26 · 107 阅读 · 0 评论 -
C# 泛型
Generics introduced in C# 2.0. Generics allow you to define a class with placeholders for the type of its fields, methods, parameters, etc. Generics replace these placeholders with some specific type ...原创 2018-12-24 14:08:27 · 144 阅读 · 1 评论 -
学习笔记
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System....原创 2019-02-11 17:42:33 · 90 阅读 · 0 评论 -
C# Windows Form comboBox 绑定 object 实例
comboBox.Items 可以是任何的数据类型, 你可以通过comboBox.Items.Add(), 逐一地把Item加到comboBox的选项列表里,也可以设置DataSource把一个collection加进去。后者比较方便。例子:1. 把DataSource绑定到List<Class1>,comboBox的SelectedItem就是Class12....原创 2019-04-19 18:15:12 · 948 阅读 · 0 评论 -
C# log4net自定义日志文件名
我们只需要在config文件的file的值用参数来赋值,不过还是有要注意的地方。<?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <section name="log4net" type="System.Configuration.Ignore...原创 2019-05-28 16:51:42 · 6157 阅读 · 0 评论 -
C# log4net日志文件名带日期
<?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/> </configSections...原创 2019-05-28 17:00:11 · 2593 阅读 · 2 评论 -
C# log4net过滤器
有时候我们只想把一些有用的内容写到日志。如果你只想把出错信息写进去,你可以用threshold<threshold value="error"/>如果你想把只包含关键字的信息写进去,你可以用过滤器 <filter type="log4net.Filter.StringMatchFilter"> <stringToMatch val...原创 2019-05-28 18:40:59 · 733 阅读 · 0 评论 -
C# salt+hash 加密
1 先明确几个基本概念 (1)伪随机数:pseudo-random number generators ,简称为:PRNGs,是计算机利用一定的算法来产生的。伪随机数并不是假随机 数,这里的“伪”是有规律的意思,就 是计算机产生的伪随机数既是随机的又是有规律的。怎样理解呢?产生的伪随机数有时遵守一定的规律,有 时不遵守任何规律;伪随机数有一部分遵守一定的规律...转载 2019-08-01 18:26:30 · 398 阅读 · 0 评论