我想在c#的windows面板控件中获取keypress事件,对我来说是否有任何身体帮助......
我有column a和column b在表中emp.我想从这些列中检索值,并通过函数找到它们之间的差异.该函数将返回真正的零差率否则返回假.我不知道如何返回一个值.
另外,如何将检索到的值存储在变量中?
string sentence = "X10 cats, Y20 dogs, 40 fish and 1 programmer.";
 string[] digits = Regex.Split (sentence, @"\D+");
对于这个代码,我得到数字数组中的值,如10,20,40,1
string sentence = "X10.4 cats, Y20.5 dogs, 40 fish and 1 programmer.";
 string[] digits = Regex.Split (sentence, @"\D+");
对于这段代码,我得到数字数组中的值,如10,4,20,5,40,1
但我喜欢这样的10.4,20.5,40,1十进制数我怎么能这样做.
x + 2y = 8,2x + y = 14这是方程式,这只是我给出的理解示例.从这个等式我喜欢用c#程序找到x,y值对我有什么帮助.如何在程序中实现这个?...
我正在使用c#windows表单应用程序和Crystal report.i我正在从数据库中以datetime格式重新审核日期但是我只想在报告中显示日期,水晶报告中的任何公式字段都有助于我解决这个问题.谢谢你.
我喜欢在带有参数的线程中调用该方法,并在此处返回一些值示例
class Program
{
    static void Main()
    {
        Thread FirstThread = new Thread(new ThreadStart(Fun1));
        Thread SecondThread = new Thread(new ThreadStart(Fun2));
        FirstThread.Start();
        SecondThread.Start();
    }
    public static void Fun1()
    {
        for (int i = 1; i <= 1000; i++)
        {
            Console.WriteLine("Fun1 writes:{0}", i);
        }
    }
    public static void Fun2()
    {
        for (int i = 1000; i >= 6; i--)
        {
            Console.WriteLine("Fun2 writes:{0}", i);
        }
    }
}
我知道上面的例子运行成功,但如果方法fun1像这样
public int fun1(int i,int j)
{
    int k;
    k=i+j;
    return k;
}
那怎么能在线程中调用它?
我喜欢从c ++ dll获取代码,我知道我们很容易通过反射器从.Net dll获得.c ++中有没有可用的方法?
提前致谢
我喜欢在linq或linq的扩展方法中调用一个没有return-type的方法?在这里我的班级我有这种情况
Class A
{
   int i;
   public int K
   {
     get { return i; }
     set { i = value; }
   }
   public void calculate(int z)
   {
     this.k=z;
   }
}
我喜欢这样做
List<A> sam = new List<A>();
//add elements to this list
var c = sam.Select( s => s.calculate(4) );
这个样本,我喜欢这样做,为了我的目的.