易截截图软件、单文件、免安装、纯绿色、仅160KB

常见算法C#描述

冒泡排序
using System;
class Program
{
public static void Main()
{
int[] a = new int[10];
Random rand = new Random();
for (int i = 0; i < 10; i++)
{
a[i] = rand.Next(10);//生成随机数给数组赋值
}
for (int i = 0; i < 10; i++)
{
Console.Write(a[i]);
}
for(int i=0;i<9;i++)
for (int j = i + 1; j < 10; j++)
{
int temp = 0;
if (a[i] > a[j])
{
temp = a[i];
a[i] = a[j];
a[j] = temp;
}
}
Console.WriteLine();
for (int i = 0; i < 10; i++)
Console.Write(a[i]);
Console.Read();
}
}


相关文档:

C#修改XML的简单例子

接上一篇《C#写XML的简单例子》
这个例子要修改XML文件中结点的属性和和元素的文本
1 原xml文件 bookstore.xml
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
  <book genre="love" ISBN="1234123">
    <title>who am i </title>
    &l ......

C#显示XML元素内容的简单例子

接上一篇
显示所有结点的内容
1 原xml文件 bookstore.xml
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
  <book ISBN="1234123">
    <title>who am i </title>
    <author>who</author>
    <price> ......

sql c#

C-#入门经典(第三版).pdf
using System;
using System.Data;
using System.Data.SqlClient;
namespace My_Student
{
    static class Program
    {
       
        static void Main()
  &n ......

GDI+入门(C#高速处理版本)

首先感谢CSDN的朋友laviewpbt为我给我的建议。
laviewpbt提出使用getpixel处理速度太慢,上不了档次。
这里我再给大家写两种处理速度更快的图形处理方式。
下面是个内存操作灰度的程序:
bmp = new Bitmap(Application.StartupPath + "\\1.jpg");
            ......

c#继承父类技巧,并增加新的实现

1 父类  partial class FormBillTemplet:Form
        /// <summary>
        /// 新单
        /// </summary>
        /// <param name="s ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号