如何在C#中使用多线程 [英] how to use multithreading in C#

查看:113
本文介绍了如何在C#中使用多线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,
编写一个函数,例如从不同的线程每秒钟调用一个通用方法,并且相同的所有线程应同时运行".所有线程值都必须根据日期和时间插入数据库中.

谢谢与问候
Sathya.

Dear All,
write a function like " call a common method for every secs from different threads and the same all thread should run simultaneously".All the thread values has to be insert in the database based on the date and time.

Thanks & Regards
Sathya.

推荐答案

我建​​议阅读以下内容:使用C#进行多线程编程 [线程(C#和Visual Basic) [演练:使用BackgroundWorker组件(C#和Visual Basic)进行多线程处理 [ C#中的多线程介绍 [针对初学者的C#线程简单介绍 [ ^ ]
I would suggest to read this: Threading Tutorial (C#)[^]

More:
Multithreaded Programming Using C#[^]
Threading (C# and Visual Basic)[^]
Walkthrough: Multithreading with the BackgroundWorker Component (C# and Visual Basic)[^]
Introduction to Multithreading in C#[^]
Simple Introduction to Threads in C# for Beginners[^]


这篇关于如何在C#中使用多线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆