`
新颖666666
  • 浏览: 31375 次
  • 性别: Icon_minigender_1
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表

xml学习

namespace xml学习 {     class Program     {         static void Main(string[] args)         {             #region xml写入1             ////创建了一个空的XDocument对象             ////创建了一个空的文档对象             //XDocument document = new XDocument();             ////1.1c创建一个文档声明             ////第一个参数是版本号  第二个参数是  字体 ...
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.Windows.Forms; using System.IO; using System.Reflection; using MyNotepadInterface; namespace 反射记事本 { ...
前台:添加一个Repeater 控件 四个LinkButton 控件         <div class="information">             <asp:Repeater ID="Repeater1" runat="server">                 <HeaderTemplate>                     <asp:Label ID="Label1" runat="server" Text="信 ...

反射介绍

        static void Main(string[] args)         {             #region 反射介绍             //反射:通过动态获取程序集 获取其中的类型元数据 然后访问类型的过程             //反射中一个非常重要的类型就是Type                         //1.如果获取Type类型的对象?             //获取Person类型的Type 对象  Type 对象中就是存放了一些关于某个类型的所有的信息的内容             //             //1>当 ...
namespace list集合中的排序方法 {     class Program     {         static void Main(string[] args)         {           //  List<int> list = new List<int>() { 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, };             List<Person> list = new List<Person>() {             new Person(){Name="wanj ...
------------------------------------------------------------------- //用委托实现的主要代码 namespace 委托来实现用户登录 { public partial class UCLogin : UserControl     {         public UCLogin()         {             InitializeComponent();         }         public  event  LoginDelegate LoginValidating;         // ...

sqlHelper

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Configuration; using System.Data; using System.Data.SqlClient; namespace sqlHelper {      public static  class SqlHelper     {          //string connStr = System.Configuration.ConfigurationManager.Conn ...
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Configuration; using System.Data.SqlClient; namespace _20150408 {     public partial class Form1 : Form ...
xml文档: <items>     <item rating="R">     <title>The Matrix</title>     <format>DVD</format>   </item>     <item><title>BlodWake</title><format>XBox</format></item>     <item> <title>fdjfjlafalj ...
XmlTextWriter writer = new XmlTextWriter("../../myMedia.xml", null);//文件的生成位置             writer.Formatting = Formatting.Indented;//对如何输出进行格式设置             writer.WriteStartElement("items");             writer.WriteStartElement("item");             writer.WriteAttribut ...
xml:文件内容 <?xml version="1.0" encoding="utf-8" ?> <employees> <nol>   <name> ma jin hu</name>   <zip> 239900</zip>   <address> feng huang street </address>   <city> chu zhou</city> </nol> <nol2>     < ...
目的:从数据库中查出一个表,将表中的name列的值,用表格的形式在,网页中显示, 准备:页面中放一个literal控件,用于绑定拼接的html代码 源代码如下: private void bindTeacher(DataSet ds, Literal literal)         {             int nameCount = ds.Tables[0].Rows.Count;//查询的总条数             DataTable  dt=ds.Tables[0];             int trTrue = nameCount % 5; ;//判断是信息条数是不是5 ...
string str = null 没有创建内存空间,str中存放的是空引用针;  string str = "" 创建了内存空间,str中存放的是指向堆中的指针。  简单地说: string str =""; 给你一张白纸; string str = null; 连白纸也没有。  string.Empty就相当于""  一般用于字符串的初始化 比如: string a;   Console.WriteLine(a);//这里会报错,因为没有初始化a    而下面不会报错: string a=string.Empty;  Console ...
这叫引入user32.dll这个动态连接库。 这个动态连接库里面包含了很多WindowsAPI函数,如果你想使用这面的函数,就需要这么引入。举个例子: [DllImport("user32.dll")] private static extern void 函数名(参数,[参数]); 函数名就是一个属于user32.dll里的一个函数。完了你就可以用那个函数了。 使用前要引用using System.Runtime.InteropServices; 示例: 程序接收来自用户的字符串并将该字符串显示在消息框中。程序使用从 User32.dll 库导入的 MessageBo ...
1.项目 -- 显示所有文件 2.右击新出现的bin,Debug等文件夹 -- 加入到项目 即可
Global site tag (gtag.js) - Google Analytics