C语言中math.h里的函数可以用   Math.XX  用
stdlib.h里的函数该怎么用呢?
比如qsort()函数?

解决方案 »

  1.   

    C#可以调用System.Math命名空间下的函数完成类似功能。
      

  2.   

    那C语言里的stdlib.h在C#中有类似的吗?????
      

  3.   

    参考c库函数_getch():
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Runtime.InteropServices;namespace ConsoleApplication1
    {
        class Program
        {
            [DllImport("msvcrt")]
            static extern int _getch();        static void Main(string[] args)
            {
                Console.WriteLine("Hello world");
                Console.WriteLine("Press any key to end..");
                _getch();
            }
        }
    }
      

  4.   

    没什么联系。非要说联系
    #include<"math.h"> 
    System.Math#include<"stdio.h"> 
    System.IO有些功能类似吧
      

  5.   

    Using语句
    qsort()函数:c#里可以用
    Using System;
    CompareTO()函数
      

  6.   

    QSort实际上应用到了Array里了。Array里的Short就是应用了快速排序。