Hi All
MSDN documentation explains the thread safety of the Dataset (and the underlying rows and tables) this way
"This type is safe for multithreaded read operations. You must synchronize any write operations.
Does this means that the following code is thread safe
public class Class
private Dataset1 m_ds = new Dataset1
public Class1(
public void AddEntry(string name, string description
lock(this
m_ds.LogEntries.AddLogEntriesRow( System.DateTime.Now, name, description )
public void GetEntry(int index, out string name, out string description
Dataset1.LogEntriesRow rw = m_ds.LogEntries[index]
description = rw.Description
name = rw.Description
My assumption is that datasets are not thread safe as soon as you start writting in it, so to be thread safe I would nee
public void GetEntry(int index, out string name, out string description
lock(this
Dataset1.LogEntriesRow rw = m_ds.LogEntries[index]
description = rw.Description
name = rw.Description
but maybe I misinterpret the documentation..
Thank
JPRoot