I want to implement multithreading in my wpf application.I have a list of tables and I need generate data files for each table concurrently.
Suppose I have a function called GenerateFiles,
public void GenerateFiles() { //creating scripts } and I have
foreach(var table in tables) { GenerateFiles(); } How can genrate the files using GenerateFiles() concurrently using threads? Is it correct ?
while(tables.count) { Thread th = new Thread(); oThread.Start(new ThreadStart(GenerateFiles)); } How can I implement this using Multithreading ?