Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DotNetDBF.MemoValue cannot be serialized because it does not have a parameterless constructor. #6

Open
jbtule opened this issue May 10, 2013 · 0 comments

Comments

@jbtule
Copy link
Member

jbtule commented May 10, 2013

Reported by [email protected], Dec 12, 2011
What steps will reproduce the problem?

DataTable table = new DataTable("Artikli");
DataColumn column;
DataRow row;

foreach (DBFField i in reader.Fields)
{
column = new DataColumn();
column.ColumnName = i.Name;
column.DataType = i.Type;
table.Columns.Add(column);
}

table.WriteXml(Path.ChangeExtension(path, "xml"));

What is the expected output? What do you see instead?
Exception: "DotNetDBF.MemoValue cannot be serialized because it does not have a parameterless constructor."

What version of the product are you using? On what operating system?
4.0, Windows 7 x64, VS2010

Please provide any additional information below.

Solution: Add null/empty constructor in DotNetDBF.MemoValue.cs
public MemoValue()
{
_lockName = string.Format("DotNetDBF.Memo.new.{0}", Guid.NewGuid());
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant