user22: I'd like to be able to add, remove, export etc. keypairs from my wallet.dat file. Looking over the source code of pywallet it doesn't look like such a tough task, but of course it's not as simple as from bsddb.db import * in C# and Google is failing me. Does anyone have some sample code or resources for how to handle wallet.dat in C#?

user1878: In addition to what Erv mentioned, the next version of the wallet may be using LevelDB for the block chain and some custom format for the private key store.
Here is more information on the LevelDB access from C# but I hope someone updates this post with a link to the best LevelDB for C# for our purposes

user326: Wallet.dat is a Berkeley DB file.  You could check out Berkeley DB for .NET to see if it is able to read the file.

22: <p>I'd like to be able to add, remove, export etc. keypairs from my wallet.dat file. Looking over the source code of <a href="https://github.com/joric/pywallet">pywallet</a> it doesn't look like such a tough task, but of course it's not as simple as <code>from bsddb.db import *</code> in C# and Google is failing me. Does anyone have some sample code or resources for how to handle wallet.dat in C#?</p>
 1878: <p>In addition to what Erv mentioned, the <a href="https://bitcoin.stackexchange.com/q/4809/1878">next version of the wallet</a> may be using LevelDB for the block chain and some custom format for the private key store.</p>

<p>Here is more information on the <a href="https://stackoverflow.com/questions/9292648/is-there-a-good-port-of-leveldb-for-c">LevelDB access from C#</a> but I hope someone updates this post with a link to the best LevelDB for C# for our purposes</p>
 326: <p>Wallet.dat is a Berkeley DB file.  You could check out <a href="http://sourceforge.net/projects/libdb-dotnet/" rel="nofollow">Berkeley DB for .NET</a> to see if it is able to read the file.</p>
