<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://developer.db4o.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Product News from the Core Team</title><subtitle type="html">This blog features product news right from the core developer team, once new features and functions get checked into &lt;a href="http://docs.db4o.com/"&gt;Subversion&lt;/a&gt;, available as &lt;a href="http://developer.db4o.com/files/19/default.aspx"&gt;Continuous Build&lt;/a&gt; every 2 hours.</subtitle><id>http://developer.db4o.com/blogs/product_news/atom.aspx</id><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/default.aspx" /><link rel="self" type="application/atom+xml" href="http://developer.db4o.com/blogs/product_news/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61019.2">Community Server</generator><updated>2008-04-23T04:00:00Z</updated><entry><title>LINQ for the Compact Framework 3.5</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/09/24/linq-for-the-compact-framework-3-5.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/09/24/linq-for-the-compact-framework-3-5.aspx</id><published>2008-09-24T11:40:00Z</published><updated>2008-09-24T11:40:00Z</updated><content type="html">Db4o for .NET 3.5 ships with an optimizing LINQ provider. This provider is able to optimize the execution of a query by analyzing the LINQ expression tree emitted by the C# (or VB.NET) compiler to produce an equivalent SODA query which can be executed by db4o at full speed.&lt;br&gt;&lt;br&gt;The Compact Framework 3.5 however includes no support for expression trees. No expression trees, no optimizing LINQ provider. A saddening state of affairs for Compact Framework db4o users.&lt;br&gt;&lt;br&gt;As it turns out, expression trees are provided by the System.Linq.Expressions namespace which is not available in the standard Compact Framework 3.5 distribution.&lt;br&gt;&lt;br&gt;&lt;b&gt;Mono to the rescue&lt;/b&gt;&lt;br&gt;&lt;br&gt;The Mono project provides a free software implementation of the .net framework including LINQ and the System.Linq.Expressions namespace.&lt;br&gt;&lt;br&gt;Hypothesis: will the Compact Framework compiler emit expression trees if it sees a reference to a compatible assembly that provides a System.Linq.Expressions namespace?&lt;br&gt;&lt;br&gt;Yes it will. LINQ for Compact Framework seemed to be possible.&lt;br&gt;&lt;br&gt;There was a remaining issue. When the db4o LINQ provider cannot optimize a query down to SODA it can simply execute it as a LINQ for Objects query. This is accomplished by invoking the Compile method on the expression tree. The returned delegate can be used to evaluate the expression whenever needed. But the Compile method relies on System.Reflection.Emit which is again not supported by the Compact Framework. Hmpf.&lt;br&gt;&lt;br&gt;The final piece of the puzzle appeared when &lt;a href="http://www.mainsoft.com/"&gt;Mainsoft&lt;/a&gt; contributed an expression tree interpreter to Mono. Expression tree evaluation that didn't rely on System.Reflection.Emit. Yummy.&lt;br&gt;&lt;br&gt;So thanks to the hard and loving work of the Mono and Mainsoft guys we are able to ship to you &lt;b&gt;the first optimizing LINQ provider for the Compact Framework&lt;/b&gt;.&lt;br&gt;&lt;br&gt;&lt;a href="http://evain.net/blog/articles/2008/09/22/linq-expression-trees-on-the-compact-framework"&gt;A nice hack indeed&lt;/a&gt;.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=51204" width="1" height="1"&gt;</content><author><name>Rodrigo B. de Oliveira</name><uri>http://developer.db4o.com/members/Rodrigo+B.+de+Oliveira.aspx</uri></author><category term="Linq" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/Linq/default.aspx" /></entry><entry><title>Collected Generics, Volume 1</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/09/12/collected-generics-volume-1.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/09/12/collected-generics-volume-1.aspx</id><published>2008-09-12T11:49:00Z</published><updated>2008-09-12T11:49:00Z</updated><content type="html">Finally we are starting to harvest the fruits of our work on pluggable type handlers. As a first step, please welcome .NET generic collections to the exclusive club of types natively supported by db4o in the upcoming 7.6 build.&lt;br&gt;&lt;br&gt;In principle, .NET generic collections could already be persisted in previous versions, but there was no dedicated handling in place for them. db4o would not recognize them as collections and would simply handle them as any other object - inspect their internal layout and persist the field values found. This approach came with some pitfalls. Most notably, db4o would not recognize the collection's internal state objects as parts of a single, atomic unit - in C/S mode, concurrent updates from multiple clients against the same collections could have resulted in inconsistent internal collection state in the worst case. Furthermore, issues could arise with specific collection implementations: Dictionaries, for example, would persist hash codes alongside keys/values and could stumble when attempting to reload this data in a different runtime version (as GetHashCode() implementations may change yielding different hash values). Plus, last but not least, dedicated collection handling opens the path for performance optimizations.&lt;br&gt;&lt;br&gt;With the current type handler infrastructure in place, providing custom handling for .NET generic collections as its first "real world" application went pretty smooth - actually the bulk of the effort was spent on the implementation of combinatorial regression testing of permutations of collection, field and element types - take a look at &lt;a href="https://source.db4o.com/db4o/trunk/db4o.net/Db4objects.Db4o.Tests/native/Db4objects.Db4o.Tests/CLI2/Handlers/"&gt;GenericCollectionTypeHandlerTestSuite&lt;/a&gt;, if you're interested. As of now, dedicated type handler support is available for the following collection flavors:&lt;br&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;List&amp;lt;T&amp;gt;&lt;/li&gt;&lt;li&gt;LinkedList&amp;lt;T&amp;gt;&lt;/li&gt;&lt;li&gt;Stack&amp;lt;T&amp;gt;&lt;/li&gt;&lt;li&gt;Queue&amp;lt;T&amp;gt;&lt;/li&gt;&lt;li&gt;Dictionary&amp;lt;K,V&amp;gt;&lt;/li&gt;&lt;li&gt;SortedList&amp;lt;K,V&amp;gt;&lt;/li&gt;&lt;li&gt;SortedDictionary&amp;lt;K,V&amp;gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;These collections now should blend in seamlessly with the behavior of non-generic collections. More to come - but if you're missing a dedicated type handler for a specific flavor, of course you're also invited to &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2008/08/23/wanted-typehandlers.aspx"&gt;contribute&lt;/a&gt;. ;)&lt;br&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=51051" width="1" height="1"&gt;</content><author><name>Patrick Roemer</name><uri>http://developer.db4o.com/members/Patrick+Roemer.aspx</uri></author><category term=".NET" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/.NET/default.aspx" /><category term="TypeHandler" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/TypeHandler/default.aspx" /><category term="Collections" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/Collections/default.aspx" /></entry><entry><title>Latest production build: 7.4.58.11547</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/09/02/latest-production-build-7-4-58-11547.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/09/02/latest-production-build-7-4-58-11547.aspx</id><published>2008-09-02T10:51:00Z</published><updated>2008-09-02T10:51:00Z</updated><content type="html">&lt;P&gt;here is a short info to resolve a race condition between our newsletter sendout and the very latest production build:&lt;/P&gt;
&lt;P&gt;We got informed about a serious (blocker) bug with a deadlock in committed callbacks after our newsletter had already been released to marketing: &lt;A href="http://tracker.db4o.com/browse/COR-1377"&gt;COR-1377&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This bug received the highest priority and it has has been fixed immediately.&lt;/P&gt;
&lt;P&gt;A new production build with the build number 7.4.58.11547 is online in the meanwhile. If you downloaded 7.4 right after the newsletter and if you use committed callbacks or UUIDs, we recommend to check the build number you are using (call Db4o#version() / Db4oFactory#Version() ) and to download the very latest build once again if it is lower than 7.4.58.&lt;/P&gt;
&lt;P&gt;To our knowledge this bug has been present in all 7.2 builds.&lt;/P&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=50874" width="1" height="1"&gt;</content><author><name>Carl Rosenberger</name><uri>http://developer.db4o.com/members/Carl+Rosenberger.aspx</uri></author></entry><entry><title>Performance Contest Results</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/08/27/performance-contest-results.aspx" /><link rel="enclosure" type="application/pdf" length="814586" href="http://developer.db4o.com/blogs/product_news/attachment/50783.ashx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/08/27/performance-contest-results.aspx</id><published>2008-08-27T10:16:00Z</published><updated>2008-08-27T10:16:00Z</updated><content type="html">&lt;P&gt;Two months ago &lt;A href="http://developer.db4o.com/blogs/community/archive/2008/06/28/new-performance-contest-help-us-make-db4o-ultra-fast.aspx"&gt;we invited&lt;/A&gt; the db4o community to take part in the first db4o performance contest. Now the contest has been completed. Here are the results.&lt;/P&gt;
&lt;P&gt;Three entries are eligible for prizes:&lt;/P&gt;
&lt;P&gt;June 15&lt;BR&gt;Andrew Zhang &lt;A href="http://developer.db4o.com/forums/thread/49670.aspx"&gt;submitted&lt;/A&gt; a patch that improves the speed to sort queries.&lt;/P&gt;
&lt;P&gt;June 19&lt;BR&gt;Andrew Zhang &lt;A href="http://developer.db4o.com/forums/thread/49739.aspx"&gt;submitted&lt;/A&gt; a UTF-8 string encoder.&lt;/P&gt;
&lt;P&gt;July 17&lt;BR&gt;Erik Putrycz &lt;A href="http://developer.db4o.com/forums/thread/50189.aspx"&gt;submitted&lt;/A&gt; a patch to reuse query results in subsequent similar queries.&lt;/P&gt;
&lt;P&gt;Andrew and Erik wrote own Poleposition circuits for their patches to be able to measure performance improvements. They have been incorporated into the db4opolepos project in our SVN as circuits "Hockenheim" and "Hungaroring".&lt;/P&gt;
&lt;P&gt;The three patched jars that Andrew and Eric supplied have been renamed to db4o-7.2-sortedquery.jar, db4o-7.2-utf8.jar, and db4o-7.4-cachedqueries.jar to make it easy to distinguish the results. These jars have also been checked into the db4opolepos project. Anyone can easily reproduce the performance race by running org.polpos.AllRacesRunner from this project.&lt;/P&gt;
&lt;P&gt;The results from running this benchmark on our hardware are attached to this posting as PerformanceContest.pdf.&lt;/P&gt;
&lt;P&gt;Our impression from reviewing the results and the patches:&lt;/P&gt;
&lt;P&gt;- The effect of the tuned quicksort algorithm on query sorting is absolutely amazing. Improvements are indeed in the range of 20x to 300x as you can see in Hockenheim#query_ascending and #query_descending on pages 52 and 53 of the attached Poleposition results. The patch is very straightforward and very nice, so it can immediately go into production code as is. A perfect submission.&lt;/P&gt;
&lt;P&gt;- The UTF-8 string encoder reduces the required slot length for stored strings. Shorter slots result in faster writes as you can see in Nurburgring#write on page 24 of the attached Poleposition run. A performance improvement of about 20% is measurable. Incorporation of the patch code into the db4o core would require some more work: Probably we would add UTF-8 as a third configurable string encoding. Possibly we could make it the default. In any case we would have to continue to support the existing Unicode string encoding. The submission shows very nicely how easy a UTF-8 string encoder is. We should make one available soon.&lt;/P&gt;
&lt;P&gt;- The idea to cache query results is great. A working implementation is certainly an order of magnitude more difficult to write than the other two submitted patches. Somehow the Hungaroring benchmark shows a slowdown instead of an improvement. After Erik's comments that our Trunk code got slower for concurrent queries, we have also compared running the patched Jar against Trunk and Trunk still turns out to be faster. Erik's submission also does not exactly follow the rules of the contest: &lt;BR&gt;The patch is not applied to the 7.2 workspace, so a direct comparison run to other submissions is not completely fair. In any case we really liked the idea and we have to give credit for trying.&lt;/P&gt;
&lt;P&gt;So how do we judge the three submissions and who gets first, second and third prize?&lt;/P&gt;
&lt;P&gt;Andrew's submissions both are measurable and they are both in compliance with the rules that we have set up. Erik's submission is a great idea, but it is not 100% complete and we have not yet seen the improvement clearly documented in a Poleposition run.&lt;/P&gt;
&lt;P&gt;The core team reviewers suggest to award prizes as follows:&lt;BR&gt;1st USD 3000 Andrew Zhang&lt;BR&gt;2nd USD 2000 Andrew Zhang&lt;BR&gt;3rd USD 1000 Erik Putrycz&lt;/P&gt;
&lt;P&gt;If anyone in our community has a different opinion, please post it to our performance forum.&lt;/P&gt;
&lt;P&gt;Andrew and Erik: Thank you very much for your submissions. You have deserved the prizes!&lt;/P&gt;
&lt;P&gt;For all other developers that tried to improve performance but did not complete a submission on time: Thank you for trying!&lt;BR&gt;If you have suggestions how to improve the Performance Contest, please tell us about them. Maybe it would make sense to let the contest run for a longer period of time than 2 months? What do you think?&lt;/P&gt;
&lt;P&gt;We are very happy to have received usable patches in this first db4o performance contest. Hopefully we will get even more contributions the next time.&lt;/P&gt;
&lt;P&gt;It is great to work with such a nice community!&lt;/P&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=50783" width="1" height="1"&gt;</content><author><name>Carl Rosenberger</name><uri>http://developer.db4o.com/members/Carl+Rosenberger.aspx</uri></author></entry><entry><title>Wanted: TypeHandlers</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/08/23/wanted-typehandlers.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/08/23/wanted-typehandlers.aspx</id><published>2008-08-22T16:29:00Z</published><updated>2008-08-22T16:29:00Z</updated><content type="html">&lt;P&gt;You were playing with the idea to contribute to db4o? So far you did not find a nice, easy and short task to take on? Here is your chance: Write a TypeHandler for db4o and get your code included in the db4o core distribution tomorrow.&lt;/P&gt;
&lt;P&gt;db4o comes with a big promise: Just call ObjectContainer#store() and any object and all attached objects will be automagically stored. The challenge to do this is high: Every possible class out there needs to be "understood" by db4o and an efficient byte array representation needs to be created on storage media. Indexing of "parts" of objects and querying is part of the task. With evolving languages and an increasing number of class constructs that&amp;nbsp; need to be supported we decided to make it easier to write the code for marshalling and unmarshalling: Enter TypeHandlers.&lt;/P&gt;
&lt;P&gt;TypeHandlers define how objects of a specific class are stored, loaded and queried by db4o. &lt;/P&gt;
&lt;P&gt;By default db4o stores and restores all non-transient fields of an object. By writing TypeHandlers it is possible to alter the behaviour. A TypeHandler could decide to store only some members of a class or it could decide to store a completely different and more efficient representation.&lt;/P&gt;
&lt;P&gt;The possible benefits of using a Typehandler:&lt;BR&gt;- Storing and restoring objects can be faster.&lt;BR&gt;- The database file can be smaller.&lt;BR&gt;- Objects that consist of sub-objects (Example: collections) can be guarded against inconsistencies in concurrent multi-user environments by preventing "the object" from being split, but using one single contiguous slot as the marshalled representation. ( We will soon also demonstrate a stateful collection implementation over multiple pages, also powered by a Typehandler.)&lt;BR&gt;- Fields that are intended to be transient do not need to be stored.&lt;BR&gt;- Typehandlers can alter behaviour even if the sources of the persistent classes are not available or can not be altered.&lt;BR&gt;- Querying support.&lt;/P&gt;
&lt;P&gt;TypeHandlers are expected to do the complete marshalling of an object by writing/reading directly to/from the marshalling buffer.&lt;/P&gt;
&lt;P&gt;About a year ago the TypeHandler4 interface consisted of more than 40 methods. Today only 5 methods remain. To make sure that the TypeHandler interface is ready for heavy duty use, we have already used it ourselves to implement some collection typehandlers. See:&lt;BR&gt;com.db4o.typehandlers.CollectionTypeHandler&amp;nbsp; (Java)&lt;BR&gt;com.db4o.typehandlers.MapTypeHandler (Java)&lt;BR&gt;Db4objects.Db4o.Typehandlers.ListTypeHandler (.NET)&lt;BR&gt;Db4objects.Db4o.Typehandlers.MapTypeHandler (.NET)&lt;/P&gt;
&lt;P&gt;In the latest development build (7.5.x.y) these TypeHandlers are already turned on to do real work storing, loading and querying some selected collections. To see how internal TypeHandlers are configured, take a look at:&lt;BR&gt;com.db4o.internal.TypeHandlerConfigurationJDK_1_2 (Java)&lt;BR&gt;Db4objects.Db4o.Internal.TypeHandlerConfigurationDotNet (.NET)&lt;/P&gt;
&lt;P&gt;You will notice that many TypeHandlers are still missing if the full featureset of JDK and .NET collections is to be supported. Here is where we would like to ask you for your help:&lt;BR&gt;Could you write a TypeHandler for us for a collection class that you think we need to support?&lt;/P&gt;
&lt;P&gt;Adapting and registering one of the already existing typehandlers for your favourite collection will probably take you less than an hour of work. You can simply follow the pattern that is already there.&lt;/P&gt;
&lt;P&gt;However writing the TypeHandler code is not the complete story. Since we want to be absolutely sure that a new TypeHandler works correctly, the bigger part of the implementation work is required for testing. We want to make sure that objects stored with an older version of db4o can be read and stored even after your new TypeHandler is installed.&lt;/P&gt;
&lt;P&gt;For this purpose we developed the "Db4oMigrationTestSuite" test.&lt;BR&gt;On Java you can run this class directly. You will find it in our SVN in the db4ojdk1.2 project.&amp;nbsp;&lt;BR&gt;( If you have not worked with the db4o sources before, &lt;A href="http://developer.db4o.com/Resources/view.aspx/Reference/Working_With_Source_Code"&gt;here&lt;/A&gt; is a guide to get started. )&lt;/P&gt;
&lt;P&gt;If you develop for .NET you would check out the db4o.net project from our SVN. You would typically work with the Db4o-2008.sln solution in the top level folder. To run the tests, the Db4objects.Db4o.Tests-2008 project would be your startup project. To save time by not running all the tests every time you can edit Db4objects.Db4o.Tests.AllTests in the Db4objects.Db4o.Tests-2008 project: If you want to run migration tests only, you can comment out all the entries in the #TestCases() method and add the following instead:&lt;BR&gt;typeof(Db4objects.Db4o.Tests.Common.Migration.Db4oNETMigrationTestSuite)&lt;/P&gt;
&lt;P&gt;Both for Java and .NET: &lt;BR&gt;If you want the Db4oMigrationTestSuite to truely run against all relevant old db4o engines, you should check out the db4o.archives project from our SVN also.&lt;/P&gt;
&lt;P&gt;Once you have testing set up and running, you are ready to go to write your own test for updating your favourite collection. &lt;/P&gt;
&lt;P&gt;For an example how an update test could look like, please see:&lt;BR&gt;com.db4o.db4ounit.common.handlers.ArrayListUpdateTestCase (Java)&lt;BR&gt;Db4objects.Db4o.Tests.CLI2.Handlers.GenericListVersionUpdateTestCase (.NET)&lt;/P&gt;
&lt;P&gt;Only when you have the test in place it makes start to implement your own TypeHandler as a more efficient method to store the collection. Test first, remember?&lt;/P&gt;
&lt;P&gt;Should you have any problems to get started, please ask for help in the db4o product developer forum. It is a good idea to announce any work that you are about to do in the forum in any case. That will ensure that the work for a specific collection is only done once.&lt;/P&gt;
&lt;P&gt;Now that you are all set to start:&lt;BR&gt;Good luck for writing your TypeHandler!&lt;/P&gt;
&lt;P&gt;All the new Typehandlers we have built so far are now available in the &lt;A href="http://developer.db4o.com/Resources/view.aspx/Reference/Working_With_Source_Code"&gt;TRUNK of our SVN&lt;/A&gt; and with our &lt;A href="http://developer.db4o.com/files/19/default.aspx"&gt;continous build&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;They help to make storage of collections more efficient:&lt;BR&gt;- Less state is pushed around than with our previous translator approach.&lt;BR&gt;- Maps no longer store an internal Entry object for each entry.&lt;BR&gt;- All .NET collections, including all .NET generic collections will soon be handled efficiently with Typehandlers. Current issues with .NET generic collections in concurrent multi-user setups will soon be history.&lt;BR&gt;- Old database files can be read with new Typehandlers installed. Future marshalling format changes are easily possible by writing and installing yet further new Typehandlers.&lt;BR&gt;- We have a very nice hook into collection treatment that we will be able to use for much faster collections.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=50725" width="1" height="1"&gt;</content><author><name>Carl Rosenberger</name><uri>http://developer.db4o.com/members/Carl+Rosenberger.aspx</uri></author></entry><entry><title>Synchronization issues in networking C/S fixed</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/08/02/synchronization-issues-in-networking-c-s-fixed.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/08/02/synchronization-issues-in-networking-c-s-fixed.aspx</id><published>2008-08-02T13:32:00Z</published><updated>2008-08-02T13:32:00Z</updated><content type="html">We have fixed some thread synchronization issues in the C/S protocol and put  new versions (rev. x.y.54.11278) for all branches online in the &lt;a href="http://developer.db4o.com/files/default.aspx"&gt;download center&lt;/a&gt;. Users with concurrent networking C/S in connection with lazy queries are recommended to upgrade. For more information, please refer to the corresponding &lt;a href="http://tracker.db4o.com/browse/COR-1346"&gt;tracker entry&lt;/a&gt;.&lt;br&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=50483" width="1" height="1"&gt;</content><author><name>Patrick Roemer</name><uri>http://developer.db4o.com/members/Patrick+Roemer.aspx</uri></author></entry><entry><title>Debugging TA Enhanced Code and the Observer Effect</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/07/29/debugging-ta-enhanced-code-and-the-observer-effect.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/07/29/debugging-ta-enhanced-code-and-the-observer-effect.aspx</id><published>2008-07-29T00:03:00Z</published><updated>2008-07-29T00:03:00Z</updated><content type="html">&lt;p&gt;
Most of those who pair programmed with me know that I'm not very fond of debugging code by stepping through breakpoints inside an IDE. I'd much rather construct hypotheses on why the code is failing and systematically test them with carefully placed assertions and print statements.
&lt;/p&gt;
&lt;p&gt;
One reason for that is the &lt;a href="http://en.wikipedia.org/wiki/Observer_effect"&gt;observer effect&lt;/a&gt; of debugging: the execution environment can be a little different, timings are usually changed, object inspectors might end up calling methods with unwanted side-effects and so on.
&lt;/p&gt;
&lt;p&gt;
The last point is a particularly important one to keep in mind when dealing with code that's been enhanced for &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2008/01/10/from-transparent-activation-to-transparent-persistence.aspx"&gt;Transparent Persistence&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Let's say we have built the latest and greatest library management application and now want to put a web front end on top of it. We've been following web development trends and so we know AJAX is a must these days. We just need some simple way to transfer the objects from the server to the browser javascript runtime: &lt;a href="http://www.json.org/"&gt;JSON&lt;/a&gt; to the rescue. Good thing we can reuse some reflection based &lt;a href="https://source.db4o.com/db4o/trunk/sandbox/rodrigo/blogs/DebuggingTA/JSON/JSONSerializer.vb"&gt;JSON serialization code&lt;/a&gt; we had laying around.
&lt;/p&gt;
&lt;p&gt;
We write a quick spike to see how well it works:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;&lt;font color="#000000"&gt;    &lt;font color="#006699"&gt;&lt;b&gt;Dim&lt;/b&gt;&lt;/font&gt; book &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;New&lt;/b&gt;&lt;/font&gt; Book(&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;The&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;God&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;Delusion&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;)&lt;br&gt;    book&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;AddAuthor(&lt;font color="#006699"&gt;&lt;b&gt;New&lt;/b&gt;&lt;/font&gt; Author(&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;Richard&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;Dawkins&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;))&lt;br&gt;    &lt;br&gt;    Console&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;WriteLine(&lt;font color="#006699"&gt;&lt;b&gt;New&lt;/b&gt;&lt;/font&gt; JSONSerializer()&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Serialize(book))&lt;br&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;
Which give us the expected output: &lt;br&gt;&lt;/p&gt;&lt;pre style="background-color:black;color:white;"&gt;	{ _title: "The God Delusion", _authors: [{ _name: "Richard Dawkins" }] }&lt;br&gt;&lt;/pre&gt;

&lt;p&gt;
We try one more spike to convince us we can get JSON out of a db4o query result:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;&lt;font color="#000000"&gt;    &lt;font color="#006699"&gt;&lt;b&gt;Using&lt;/b&gt;&lt;/font&gt; db &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; OpenDatabase()&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;For&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;Each&lt;/b&gt;&lt;/font&gt; book &lt;font color="#006699"&gt;&lt;b&gt;In&lt;/b&gt;&lt;/font&gt; db&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Query(of Book)()&lt;br&gt;            Console&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;WriteLine(&lt;font color="#006699"&gt;&lt;b&gt;New&lt;/b&gt;&lt;/font&gt; JSONSerializer()&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Serialize(book))&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;Next&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;End&lt;/b&gt;&lt;/font&gt; Using&lt;br&gt;    &lt;br&gt;&lt;/font&gt;&lt;/pre&gt;
Unfortunately this gives us something completely unexpected and it's not the &lt;a href="http://www.youtube.com/watch?v=Tym0MObFpTI&amp;amp;feature=related" target="_blank"&gt;Spanish Inquisition&lt;/a&gt;:
&lt;pre style="background-color:black;color:white;"&gt;	{ _title: null, _authors: null }&lt;br&gt;&lt;/pre&gt;

&lt;p&gt;
We place a breakpoint inside the loop so we can inspect the book instance:

   &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/94072001@N00/2712473580/" title="Debugging TA With VB by Rodrigo B. de Oliveira, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3060/2712473580_f596c73b01.jpg" alt="Debugging TA With VB" height="284" width="500"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;
   
It sure looks right and oddly enough we get the right output this time: &lt;br&gt;&lt;/p&gt;&lt;pre style="background-color:black;color:white;"&gt;	{ _title: "The God Delusion", _authors: [{ _name: "Richard Dawkins" }] }&lt;br&gt;&lt;/pre&gt;
&lt;p&gt;
What's going on?
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://developer.db4o.com/blogs/product_news/archive/2007/12/11/object-activation-in-depth.aspx"&gt;Transparent Activation&lt;/a&gt; is going on or rather NOT going on:
&lt;/p&gt;&lt;ol&gt;
&lt;li&gt;Our Book and Author classes were enhanced for Transparent Activation, Db4oTool injected the code required to implement IActivatable as well as the code that transparently activates the object before any field access;&lt;/li&gt;
&lt;li&gt;JSONSerializer uses reflection to access objects fields;&lt;/li&gt;
&lt;li&gt;Reflection completely bypasses any code introduced by Db4oTool which explains the "{ _title: null, _authors: null }" output, the object was never activated;&lt;/li&gt;
&lt;li&gt;When inspecting an object in the debugger watch window its properties are accessed;&lt;/li&gt;
&lt;li&gt;Accessing a property of our enhanced Book object causes its *transparent* activation which also explains why we got the right output aftewards;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;
Ok, now that we have a logical explanation for what's happening how do we get our application to work as expected?
&lt;/p&gt;
&lt;p&gt;
Since JSONSerializer bypasses activation we have to ensure the object graph is completely activated before JSONSerializer gets to see it:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;&lt;font color="#000000"&gt;    &lt;font color="#006699"&gt;&lt;b&gt;Using&lt;/b&gt;&lt;/font&gt; db &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; OpenDatabase()&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;For&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;Each&lt;/b&gt;&lt;/font&gt; book &lt;font color="#006699"&gt;&lt;b&gt;In&lt;/b&gt;&lt;/font&gt; db&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Query(of Book)()&lt;br&gt;            db&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Activate(book, Integer&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;MaxValue)&lt;br&gt;            Console&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;WriteLine(&lt;font color="#006699"&gt;&lt;b&gt;New&lt;/b&gt;&lt;/font&gt; JSONSerializer()&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Serialize(book))&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;Next&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;End&lt;/b&gt;&lt;/font&gt; Using&lt;br&gt;&lt;/font&gt;&lt;/pre&gt;
And that's it.

&lt;p&gt;
Hopefully that will save you some frustration next time you need to debug Transparent Persistence enhanced code or to have it interacting with reflection based libraries.
&lt;br&gt;&lt;br&gt;
The complete code can be found &lt;a href="https://source.db4o.com/db4o/trunk/sandbox/rodrigo/blogs/DebuggingTA/"&gt;here&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;
Have fun!&lt;/p&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=50366" width="1" height="1"&gt;</content><author><name>Rodrigo B. de Oliveira</name><uri>http://developer.db4o.com/members/Rodrigo+B.+de+Oliveira.aspx</uri></author><category term="Transparent Activation" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/Transparent+Activation/default.aspx" /></entry><entry><title>Performance Contest - for one more month</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/07/17/performance-contest-for-one-more-month.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/07/17/performance-contest-for-one-more-month.aspx</id><published>2008-07-17T10:38:00Z</published><updated>2008-07-17T10:38:00Z</updated><content type="html">&lt;P&gt;Do you like profiling? Do you like tuning code? If you do, how about taking part in the db4o performance contest? We offer USD 6000 in prizes for the best contributions to make db4o faster.&lt;/P&gt;
&lt;P&gt;We have made it very easy for you to get started by providing an Eclipse workspace set up with the db4o sources and the Poleposition benchmark.&lt;/P&gt;
&lt;P&gt;Links to get you started:&lt;BR&gt;&lt;a href="http://developer.db4o.com/ProjectSpaces/view.aspx/PerformanceContest"&gt;Performance Contest page&lt;/a&gt;&lt;BR&gt;&lt;a href="http://developer.db4o.com/blogs/paircasts/archive/2008/06/13/performance-contest.aspx"&gt;"Getting Started" video&lt;/a&gt;&lt;BR&gt;&lt;a href="http://developer.db4o.com/forums/159/ShowForum.aspx"&gt;Performance Contest Forum&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The contest has been running for a month already and we are seeing first contributions coming in.&lt;/P&gt;
&lt;P&gt;Andrew has improved sorted queries and provides a UTF-8 string encoder.&lt;BR&gt;Erik is working on a query cache to make queries reusable.&lt;/P&gt;
&lt;P&gt;Can you beat their patches? I am sure you can.&lt;BR&gt;The contest is still open for contributions for one more month until August 15.&lt;/P&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=50178" width="1" height="1"&gt;</content><author><name>Carl Rosenberger</name><uri>http://developer.db4o.com/members/Carl+Rosenberger.aspx</uri></author></entry><entry><title>Implications of instrumenting assemblies for Transparent Activation / Persistence in db4o - Part I</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/07/14/implications-of-intrumenting-assemblies-for-transparent-activation-persistence-in-db4o-part-i.aspx" /><link rel="enclosure" type="image/jpeg" length="118358" href="http://developer.db4o.com/blogs/product_news/attachment/50121.ashx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/07/14/implications-of-intrumenting-assemblies-for-transparent-activation-persistence-in-db4o-part-i.aspx</id><published>2008-07-14T14:28:00Z</published><updated>2008-07-14T14:28:00Z</updated><content type="html">&lt;p&gt;As the popular saying&amp;nbsp; tell us, there's no such thing as free lunch. It is no different for work related subjects.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;When we introduced Transparent Activation (TA) concept we knew that it could make developer's life easier (by presenting a simpler model for object life cycle): developers would not be required to think about activation depths again; just let db4o activate your objects when it's need. &lt;/p&gt;

&lt;p&gt;IMHO, it was a great improvement since it not only simplifies developer's life as well brings some performance gains also (once objects get activated only when needed there's no wasted time activating objects not needed). But this was not without coasts: to benefit from this simpler model, developers were required to implement IActivatable interface for each object that they wanted to be TA. Also, once enabled, any non TA aware object will be fully activated at retrieval time.&lt;/p&gt;

&lt;p&gt;Time passed and we introduced&amp;nbsp; a way relieve developers from the need to implement Activatable interface, i.e, to make classes TA aware with no effort from developers. This is accomplished through a technique called instrumentation in which we dive into byte code level doing something like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find each type declared in a specific assembly (.net) / jar or class (java) &lt;br&gt;&lt;/li&gt;

&lt;li&gt;Analise each type found in step 1 to check whether it is a potential candidate for TA or not&lt;br&gt;&lt;/li&gt;

&lt;li&gt;If we found a potential candidate for TA&lt;br&gt;&lt;/li&gt;

&lt;ul&gt;
&lt;li&gt;Make the type to implement IActivatable interface&lt;/li&gt;

&lt;li&gt;Implement IActivatable methods&lt;br&gt;&lt;/li&gt;

&lt;li&gt;Ensure that the object will be activated prior to any field access by inspecting each field access in this type and inserting the required Activate() / activate() call prior to it. &lt;br&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;li&gt;Save the binary component&lt;br&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A pretty straight approach, I'd say.&lt;/p&gt;

&lt;p&gt;But even when using instrumentation there are some implications that developers should be aware of. To illustrate, think about assembly signing; this is a process in which a developer "seals" an assembly contents by digitally signing it (the whole concept is beyond this post). &lt;/p&gt;

&lt;p&gt;Basically, by signing an assembly a developer is providing ways to administrators to selectively grant access to assemblies based on the private key (related to the public key) used to sign it; also, signed assemblies are tamper resistant which means that&lt;b&gt; changes (in byte code level) don't go unnoticed&lt;/b&gt;. &lt;br&gt;&lt;/p&gt;

&lt;p&gt;By the above description it's clear that instrumenting&amp;nbsp; &lt;b&gt;a&lt;/b&gt; &lt;b&gt;signed assembly turns it invalid afterward&lt;/b&gt;
(since its contents gets changed) and any tentative of loading it will fail with a invalid signature error.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;So, after instrumenting signed assemblies you will need to sign them
again but,&lt;b&gt; IMHO, you should never, ever, instrument assemblies that are
not under your control&lt;/b&gt;, so I'd suggest you to just change your build
scripts so instrumentation takes place prior to signing. &lt;br&gt;&lt;/p&gt;
To help developers detect this, starting from version &lt;b&gt;7.4.52&lt;/b&gt; Db4oTool will emit an warning when asked to instrument (whether for TA/TP or Native Queries optimizations) a signed/delay signed assembly.
&lt;p&gt;Just for the sake of completeness I've included the following walk through on how to create assemblies that are instrumented and signed (for a in depth discussion on signing assemblies please, read &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc163583.aspx"&gt;this&lt;/a&gt;).&lt;/p&gt;


&lt;a href="http://www.flickr.com/photos/28625654@N07/2672448013/" title="VS Project Properties"&gt;&lt;img src="http://farm4.static.flickr.com/3148/2672448013_6ccc983f5f_m.jpg" alt="VS Project Properties" width="240" height="157"&gt;&lt;/a&gt;

&lt;a href="http://www.flickr.com/photos/28625654@N07/2673274596/" title="VS Project Properties 2 by vagaus, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3290/2673274596_d2f2ded9b7_m.jpg" alt="VS Project Properties 2" width="240" height="157"&gt;&lt;/a&gt;


&lt;ol&gt;
&lt;li&gt;In Visual Studio, open project properties window and select &lt;b&gt;signing&lt;/b&gt; tab.&lt;br&gt;&lt;br&gt;&lt;/li&gt;

&lt;li&gt;Select &lt;i&gt;Sign the assembly&lt;/i&gt;;&lt;br&gt;&lt;br&gt;&lt;/li&gt;

&lt;li&gt;Expand &lt;i&gt;Choose a strong name key file&lt;/i&gt; drop down listbox and either, select a previously created key or create a new one by selecting &lt;i&gt;&amp;lt;New...&amp;gt;&lt;/i&gt; option;&lt;br&gt;&lt;br&gt;&lt;/li&gt;

&lt;li&gt;Select &lt;i&gt;Delay sign only&lt;/i&gt; checkbox;&lt;br&gt;&lt;br&gt;&lt;/li&gt;

&lt;li&gt;Save your project and build&lt;br&gt;&lt;br&gt;&lt;/li&gt;

&lt;li&gt;Instrument your assembly (either running Db4oTool or through Db4oToolEnhancerMSBuildTask)&lt;br&gt;&lt;br&gt;&lt;/li&gt;

&lt;li&gt;After instrumentation, run sn tool as follows to finish the sign process:&lt;br&gt;&lt;br&gt;sn -Ra myassembly.dll mykey.snk&lt;br&gt;&lt;/li&gt;
&lt;/ol&gt;
That's it! Your assembly is instrumented and signed.&lt;br&gt;&lt;br&gt;In the next post I'll address some other implications / pitfalls regarding instrumentation for TA/TP.&lt;br&gt;
&lt;p&gt;Thoughts?&lt;br&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;/ul&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=50121" width="1" height="1"&gt;</content><author><name>Adriano Verona</name><uri>http://developer.db4o.com/members/Adriano+Verona.aspx</uri></author><category term=".NET" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/.NET/default.aspx" /><category term="C#" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/C_2300_/default.aspx" /><category term="documentation" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/documentation/default.aspx" /><category term="db4o" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/db4o/default.aspx" /><category term="deployement" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/deployement/default.aspx" /><category term="Transparent Activation" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/Transparent+Activation/default.aspx" /></entry><entry><title>db4o-7.4 Development Release</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/06/25/db4o-7-4-development-release.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/06/25/db4o-7-4-development-release.aspx</id><published>2008-06-24T16:03:00Z</published><updated>2008-06-24T16:03:00Z</updated><content type="html">
&lt;p&gt;The following Jira tasks and bugs were resolved for db4o-7.4 development release:&lt;/p&gt;&lt;ul&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/DRS-98"&gt;DRS-98&lt;/a&gt; - NullPointerException in replicate method
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/DRS-97"&gt;DRS-97&lt;/a&gt; - Ensure dRS.NET can gracefully handle delegates in untyped fields and arrays
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/DRS-95"&gt;DRS-95&lt;/a&gt; - dRS.NET fails with arrays/untyped fields
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/DRS-94"&gt;DRS-94&lt;/a&gt; - Replication fails if the java platform doesn't support serializable constructor and the objects to be replicated don't have default constructors
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/DRS-93"&gt;DRS-93&lt;/a&gt; - Replication fails for arrays in untyped fields
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1297"&gt;COR-1297&lt;/a&gt; - Spike: Class derived from ArrayList using custom Typehandler
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1295"&gt;COR-1295&lt;/a&gt; - Convert ListTypeHandlerTestSuite to .NET
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1291"&gt;COR-1291&lt;/a&gt; - Backport "[Linq] Enum comparisons are not optimized"  to 7.2
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1289"&gt;COR-1289&lt;/a&gt; - Clean up db4obuild for opening to the public
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1284"&gt;COR-1284&lt;/a&gt; - Defragment against unknown classes runs into NPE on btree index lookup
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1283"&gt;COR-1283&lt;/a&gt; - Update old multidimensional arrays to null bitmap handling
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1282"&gt;COR-1282&lt;/a&gt; - [decaf] functional test for resolving db4oj/db4ojdk1.2 conversion issues
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1281"&gt;COR-1281&lt;/a&gt; - Running out of disk space causes unrecoverable data corruption
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1279"&gt;COR-1279&lt;/a&gt; - Delegate in untyped arrays cause ObjectNotStorableException
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1276"&gt;COR-1276&lt;/a&gt; - prepare Jprobe paircast and blog
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1275"&gt;COR-1275&lt;/a&gt; - Db4o should not wrap exceptions thrown during event handling
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1265"&gt;COR-1265&lt;/a&gt; - ArrayHandler: Defragment old databases
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1264"&gt;COR-1264&lt;/a&gt; - ArrayHandler: Updating from old databases to new format
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1263"&gt;COR-1263&lt;/a&gt; - ArrayHandler: Bitmap Marshalling Format
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1262"&gt;COR-1262&lt;/a&gt; - Pass configuration on to reflector on startup
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1261"&gt;COR-1261&lt;/a&gt; - Move constructor handling into reflector
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1255"&gt;COR-1255&lt;/a&gt; - Provide Feedback on latest OMG SBQL vs, LINQ comparison
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1254"&gt;COR-1254&lt;/a&gt; - _blob.ReadFrom() throws Object reference not set to an instance of an object. in C/S mode 
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1247"&gt;COR-1247&lt;/a&gt; - Create releae notes for production release 7.2
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1246"&gt;COR-1246&lt;/a&gt; - Create release notes for 6.4 stable release
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1227"&gt;COR-1227&lt;/a&gt; - Prepare 7.2 "Production" release (freeze trunk)
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1216"&gt;COR-1216&lt;/a&gt; - TracerBullet: Deletion for Java ArrayList using the new Typehandler
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1214"&gt;COR-1214&lt;/a&gt; - Db server closed when upgraded from 5.5 version to 6.4.14.8331 with btree based freespace management system
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1153"&gt;COR-1153&lt;/a&gt; - [Linq] Enum comparisons are not optimized
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-1129"&gt;COR-1129&lt;/a&gt; - TracerBullet: Special use cases for Java ArrayList using the new Typehandler
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://tracker.db4o.com/browse/COR-897"&gt;COR-897&lt;/a&gt; - Concurrency tests for close/timout scenarios
&lt;/li&gt;

&lt;/ul&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=49805" width="1" height="1"&gt;</content><author><name>Tetyana</name><uri>http://developer.db4o.com/members/Tetyana.aspx</uri></author><category term="7.4 Release" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/7.4+Release/default.aspx" /></entry><entry><title>flushFileBuffers(false) and the C in ACID</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/06/18/flushfilebuffers-false-and-the-c-in-acid.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/06/18/flushfilebuffers-false-and-the-c-in-acid.aspx</id><published>2008-06-18T15:24:00Z</published><updated>2008-06-18T15:24:00Z</updated><content type="html">&lt;P&gt;The short story:&lt;BR&gt;Configuration.flushFileBuffers(false) is no more. If you still want to configure the behaviour that used to be available in db4o 6.1, you can do so by setting up IoAdapters as follows:&lt;/P&gt;&lt;PRE&gt;RandomAccessFileAdapter randomAccessFileAdapter = new RandomAccessFileAdapter();
NonFlushingIoAdapter nonFlushingIoAdapter = 
                                 new NonFlushingIoAdapter(randomAccessFileAdapter);
CachedIoAdapter cachedIoAdapter = new CachedIoAdapter(nonFlushingIoAdapter);
Configuration configuration = Db4o.newConfiguration();
configuration.io(cachedIoAdapter);
Db4o.openFile(configuration, PATH);
&lt;/PRE&gt;
&lt;P&gt;The long story:&lt;BR&gt;We do a lot of things for consistent transactions (for the C in ACID). A commit of a db4o transaction consists of 4 write phases:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Writing a commit log to the database file 
&lt;LI&gt;Switching the database file to commit mode 
&lt;LI&gt;Committing all slots 
&lt;LI&gt;Switching the database file to normal mode&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Because a cache at any level may turn around the write order of individual slots and because a failure may end up in a partial write, it is essential that all data is flushed to the device after each one of these 4 phases.&lt;/P&gt;
&lt;P&gt;This flush call takes a lot of time. It is the slowest part of the commit. On a system where you are sure enough (100% ? ) that the commit process always is successful, a tuning switch that skips flushing sounds like a smart way to improve performance.&lt;/P&gt;
&lt;P&gt;That's what we thought and why we added the #flushFileBuffers(false) configuration switch in the first place.&lt;/P&gt;
&lt;P&gt;Starting with db4o 6.4 we have added a new CachedIoAdapter to the IO layer as the default. This IoAdapter uses the #sync() calls as a signal to flush it's pages to the database file. What we did not think about well enough when we added this functionality: If users use the #flushFileBuffers(false) tuning switch, they also skip the flush of the CachedIoAdapter.&lt;/P&gt;
&lt;P&gt;This issue does not surface as long as the database file is always shut down correctly, so it took us a long time to realize how serious it can be. Since we have switched db4o 6.4 to "stable", there have been a couple of support discussions like this one:&lt;/P&gt;
&lt;P&gt;User: "We have switched to db4o 6.4. We are sometimes getting new exceptions like IncompatibleFileException."&lt;BR&gt;db4objects: "Uhoh. Are you maybe using #flushFileBuffers(false) in productive use? Please don't do that. Don't tell us that you are."&lt;BR&gt;User: "Yes we are."&lt;/P&gt;
&lt;P&gt;After investing some time and thought we have figured that the CachedIoAdapter makes it much much more likely that corruption can happen if a database file is not shut down correctly (with the #flushFileBuffers(false) configuration call). Because this is so serious (it leads to corrupted database files), we have decided to turn off this configuration switch completely.&lt;/P&gt;
&lt;P&gt;A similar functionality as in 6.1 is still available, if you really know what you are doing and if you know that you are taking the risc of corrupted database files if your system is halted because someone hits the power-off switch by accident in the middle of a commit. With the layer of IoAdapters, as outlined at the beginning of this posting, the risk of corruption is fairly small, just as it used to be in 6.1. Corruption will only happen if the OS cache or disc cache changes around the order of writes.&lt;/P&gt;
&lt;P&gt;The changes are effective and the new IoAdapter is available from iteration 48 and revision 10977 onwards, e.g. from db4o versions:&lt;BR&gt;6.4.48.10977&lt;BR&gt;7.2.48.10977&lt;BR&gt;7.4.48.10977&lt;/P&gt;
&lt;P&gt;For previous stable 6.4 versions we strongly recommend not to use the #flushFileBuffers(false) setting in production use.&lt;/P&gt;
&lt;P&gt;Many thanks to our users for reporting their problems!&lt;/P&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=49721" width="1" height="1"&gt;</content><author><name>Carl Rosenberger</name><uri>http://developer.db4o.com/members/Carl+Rosenberger.aspx</uri></author></entry><entry><title>Committed callbacks, pushed updates and read committed isolation revisited</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/06/18/committed-callbacks-pushed-updates-and-read-committed-isolation-revisited.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/06/18/committed-callbacks-pushed-updates-and-read-committed-isolation-revisited.aspx</id><published>2008-06-17T15:34:00Z</published><updated>2008-06-17T15:34:00Z</updated><content type="html">Some time ago we presented Pushed Updates as a sample application for Committed Callbacks &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2007/04/23/committed-callbacks-and-pushed-updates.aspx"&gt;in this blog&lt;/a&gt;. Recently we put a similar mechanism in a slightly different context. Since we encountered some perceived ambiguity concerning db4o transaction semantics, and since we were in for a little surprise ourselves, I'd like to briefly rehash this topic.&lt;br&gt;&lt;br&gt;Pushed Updates basically are a mechanism to provide READ COMMITTED isolation from the point of view of your application. Wait - doesn't db4o provide that out of the box?!? Well, it does. Any query is guaranteed to return objects in their most recently committed state - unless they are still in memory on the requesting client, that is. db4o cannot change the state of of a live object that may be involved in application level processes at the same time. Only the application can judge whether it is safe to modify a given object, and Committed Callbacks are the way to transfer this responsibility.&lt;br&gt;&lt;br&gt;Note that "in memory" above does not mean "in use by the application", and not even necessarily "referenced by the application". An object may still survive in the reference system some time after it has been discarded by the application, until the GC eventually hits. There is no remotely performant way to check whether there exist hard references to a given object.&lt;br&gt;&lt;br&gt;So much for the theory, let's look at the code. The core of the Pushed Updates example looked like this:&lt;br&gt;&lt;blockquote&gt;private EventListener4 createCommittedEventListener(final ObjectContainer objectContainer){&lt;br&gt;&amp;nbsp; return new EventListener4() {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onEvent(Event4 e, EventArgs args) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectInfoCollection updated = ((CommitEventArgs)args).updated();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Iterator4 infos = updated.iterator();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(infos.moveNext()){&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectInfo info = (ObjectInfo) infos.current();&lt;br&gt;&lt;font color="#ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#999999"&gt;&lt;b&gt;Object obj = info.getObject();&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objectContainer.ext().refresh(obj, 2);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp; };&lt;br&gt;}&lt;br&gt;&lt;/blockquote&gt;&lt;blockquote&gt;EventListener4 committedEventListener = createCommittedEventListener(client);&lt;br&gt;EventRegistry eventRegistry = EventRegistryFactory.forObjectContainer(client);&lt;br&gt;eventRegistry.committed().addListener(committedEventListener);&lt;br&gt;&lt;/blockquote&gt;This code registers a callback for committed events. When invoked, it will traverse all the objects that have been updated during this commit and refresh them. (The magic depth of two is a reverence to collections, forcing them to refresh their elements, too.)&lt;br&gt;&lt;br&gt;Now this works nicely - in networking C/S mode, where the communication layer between client and server takes care of the correct "translation" of object identities. In embedded C/S mode, however, there is no translation - clients run in the same "live object space" as the server, the only thing they don't share is the weak reference system that defines their notion of object identities. And so the ObjectInfo will contain the server's instance of this persisted object, while the client will have its own version that it won't be able to map to the "stranger".&lt;br&gt;&lt;br&gt;The fix is easy (and works for networking C/S, too, of course): We have to take care of the translation ourselves via ID lookup. In code:&lt;br&gt;&lt;blockquote&gt;public void onEvent(Event4 e, EventArgs args) {&lt;br&gt;&amp;nbsp; &lt;font color="#999999"&gt;&lt;b&gt;Transaction trans = ((InternalObjectContainer)client).transaction();&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&amp;nbsp; ObjectInfoCollection updated = ((CommitEventArgs)args).updated();&lt;br&gt;&amp;nbsp; Iterator4 infos = updated.iterator();&lt;br&gt;&amp;nbsp; while(infos.moveNext()){&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectInfo info = (ObjectInfo) infos.current();&lt;br&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#999999"&gt;Object obj = trans.objectForIdFromCache((int)info.getInternalID());&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(obj == null) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; client.refresh(obj, 2);&lt;br&gt;&amp;nbsp; }&lt;br&gt;}&lt;br&gt;&lt;/blockquote&gt;Here we have to fall back on the InternalObjectContainer interface. Don't be too scared of this - it's not really under the hood stuff, but it's indeed intended to be used for 3rd party implementations of pluggable db4o features intended to be run inside the core, like type handlers, reflectors - and callbacks. Note that this variant also keeps the handler from further processing of objects that haven't been known to this client, anyway.&lt;br&gt;&lt;br&gt;Bottom line: Transaction semantics and live in-memory objects are not entirely trivial to align, object identities can be tricky, and this is the recommended generic way for doing Pushed Updates. For networking C/S, the original Pushed Updates example is fine as it was.&lt;br&gt;&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=49719" width="1" height="1"&gt;</content><author><name>Patrick Roemer</name><uri>http://developer.db4o.com/members/Patrick+Roemer.aspx</uri></author><category term="Callbacks" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/Callbacks/default.aspx" /><category term="Transaction Isolation" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/Transaction+Isolation/default.aspx" /></entry><entry><title>Sharpen your Java app now: Java to C# converter released as free software</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/05/21/sharpen-your-java-app-now-java-to-c-converter-released-as-free-software.aspx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/05/21/sharpen-your-java-app-now-java-to-c-converter-released-as-free-software.aspx</id><published>2008-05-20T16:27:00Z</published><updated>2008-05-20T16:27:00Z</updated><content type="html">As of today, db4objects releases its Eclipse based Java to C# source code conversion tool "sharpen" as free software.&lt;br id="fu8l3"&gt;&lt;br id="fu8l4"&gt;sharpen
is the "secret sauce" that enables us to provide the [db4o object
database engine] in native versions for the Java and .NET platforms
from a single code base. &lt;br id="wvky0"&gt;&lt;br id="wvky1"&gt;Features include:&lt;br id="fu8l6"&gt;
&lt;ul&gt;
&lt;li&gt;mapping between Java and .NET native type systems&lt;/li&gt;
&lt;li&gt;compliance with C# coding conventions&lt;/li&gt;
&lt;li&gt;user defined namespace/class/method mappings&lt;/li&gt;
&lt;li&gt;method to property mappings&lt;/li&gt;
&lt;li&gt;Generics support&lt;/li&gt;
&lt;li&gt;partial conversions&lt;/li&gt;
&lt;li&gt;mixing native and converted C# sources&lt;/li&gt;
&lt;li&gt;VS solution file support&lt;/li&gt;
&lt;li&gt;Ant integration&lt;br id="fu8l15"&gt;&lt;/li&gt;
&lt;/ul&gt;
sharpen
is used extensively in the db4o build system, generating most of the
db4o engine core code and the unit test suites from the Java sources.&lt;br id="fu8l17"&gt;&lt;br id="fu8l18"&gt;Before
you start dreaming: sharpen is not a "magic wand". Don't expect to feed
it an arbitrary Java app and receive a running .NET version at the push
of a button. The translation process will require some design
compromises on the Java side, and parts of the .NET code still have to
be hand crafted and integrated into the converted sources. Still, we
believe sharpen provides an amazingly smooth way to bridge the gap
between Java and .NET and create real cross platform applications.&lt;br id="fu8l19"&gt;&lt;br id="fu8l20"&gt;We
are looking forward to see which sharpen propelled applications will
cross the language chasm, and we're hoping on your feedback and your
contributions that will help to cover automatic conversion of even more
Java constructs and idioms, moving Java/.NET cross platform integration
to a new level.&lt;br id="fu8l21"&gt;&lt;br id="fu8l22"&gt;sharpen is released
under the GPL. The &lt;a href="https://source.db4o.com/db4o/trunk/sharpen"&gt;svn repository&lt;/a&gt;, &lt;a href="http://developer.db4o.com/Resources/view.aspx/Reference/Sharpen"&gt;documentation&lt;/a&gt; and &lt;a href="http://tracker.db4o.com/browse/SHA"&gt;issue
tracker&lt;/a&gt; are online. All that's missing now is you bringing your Java
app to the .NET platform. To get you started, &lt;a href="http://developer.db4o.com/blogs/product_news/archive/2008/05/20/smart-java-to-c-conversion-for-the-masses-with-sharpen.aspx"&gt;here&lt;/a&gt; is the full
anatomy of a simplistic application developed with sharpen. Have fun!&lt;img src="http://developer.db4o.com/aggbug.aspx?PostID=49154" width="1" height="1"&gt;</content><author><name>Patrick Roemer</name><uri>http://developer.db4o.com/members/Patrick+Roemer.aspx</uri></author><category term="Java" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/Java/default.aspx" /><category term=".NET" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/.NET/default.aspx" /><category term="Sharpen" scheme="http://developer.db4o.com/blogs/product_news/archive/tags/Sharpen/default.aspx" /></entry><entry><title>Smart java to c# conversion for the masses with sharpen</title><link rel="alternate" type="text/html" href="http://developer.db4o.com/blogs/product_news/archive/2008/05/20/smart-java-to-c-conversion-for-the-masses-with-sharpen.aspx" /><link rel="enclosure" type="image/gif" length="36912" href="http://developer.db4o.com/blogs/product_news/attachment/49151.ashx" /><id>http://developer.db4o.com/blogs/product_news/archive/2008/05/20/smart-java-to-c-conversion-for-the-masses-with-sharpen.aspx</id><published>2008-05-20T15:49:00Z</published><updated>2008-05-20T15:49:00Z</updated><content type="html">&lt;p&gt;As of Today our so far internal java to c# conversion utility, sharpen, is being released as free software. &lt;/p&gt;

&lt;p&gt;As an example of its usage we're going to write a simple contact management application in java and convert it to c#. &lt;/p&gt;

&lt;p&gt;While it is possible to use sharpen to convert a complete application it is advisable to handle this as an iterative process: java a little, sharpen a little. The reason for this is that not all java constructs and idioms can be handled out of the box by sharpen, thus the translation might influence the design of the original java code. &lt;/p&gt;

&lt;p&gt;As a first step we'll come up with a minimum skeleton for our console application, ignoring any "business logic" for now: &lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#009966"&gt;&lt;b&gt;package&lt;/b&gt;&lt;/font&gt; contacts;&lt;br&gt;&lt;br&gt;&lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; Program &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;main&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;String[] args&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#0099ff"&gt;&lt;b&gt;boolean&lt;/b&gt;&lt;/font&gt; running &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#cc00cc"&gt;true&lt;/font&gt;;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;while&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;running&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            String option &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; Console.&lt;font color="#9966ff"&gt;prompt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;(a)dd&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;new&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;entry,&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;(l)ist&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;entries,&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;(q)uit&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;option.&lt;font color="#9966ff"&gt;isEmpty&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;continue&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;switch&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;option.&lt;font color="#9966ff"&gt;charAt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;case&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt;q&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;:&lt;br&gt;                running &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#cc00cc"&gt;false&lt;/font&gt;;&lt;br&gt;                &lt;font color="#006699"&gt;&lt;b&gt;break&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;default&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                System.out.&lt;font color="#9966ff"&gt;println&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;+&lt;/b&gt;&lt;/font&gt; option &lt;font color="#000000"&gt;&lt;b&gt;+&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;DOES&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;NOT&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;COMPUTE!&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;            &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#009966"&gt;&lt;b&gt;package&lt;/b&gt;&lt;/font&gt; contacts;&lt;br&gt;&lt;br&gt;&lt;font color="#009966"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; java.io.*;&lt;br&gt;&lt;br&gt;&lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; Console &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; String &lt;font color="#9966ff"&gt;prompt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;String prompt&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        System.out.&lt;font color="#9966ff"&gt;println&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;prompt&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;readLine&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; String &lt;font color="#9966ff"&gt;readLine&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;BufferedReader&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#006699"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;InputStreamReader&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;System.in&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;.&lt;font color="#9966ff"&gt;readLine&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;IOException e&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;throw&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;RuntimeException&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;e&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Here we can already see the first design decision triggered by sharpen. The console APIs for java and .net are quite different and although sharpen can handle IO primitives gracefully, it doesn't support translating our specific use of "System.in". The obvious way of handling situations like this is to factor out the required functionality into a specialized class and provide dedicated implementations for java and .net. &lt;/p&gt;

&lt;p&gt;With the first java iteration complete let's get to sharpening it. &lt;/p&gt;

&lt;p&gt;Before we can get any conversion done, the sharpen.core plugin must be installed. From inside eclipse: 
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Checkout sharpen.core from db4o's subversion repository at https://source.db4o.com/db4o/trunk/sharpen/ &lt;/li&gt;

&lt;li&gt;Right click the freshly checked out project in the "Package Explorer" and choose "Export" from the context menu; &lt;/li&gt;

&lt;li&gt;Expand the "Plug-in Development" folder and select "Deployable plug-ins and fragments"; &lt;/li&gt;

&lt;li&gt;Set "Destination" to the root folder of your eclipse installation and click "Finish"; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We're ready to automate the conversion from java to c# with an ant script. In order to make this task easier, we will reuse a few sharpen related macros defined in &lt;a href="https://source.db4o.com/db4o/trunk/sandbox/blogs/SharpenExamples/ContactList/sharpen-common.xml"&gt;sharpen-common.xml&lt;/a&gt;. &lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;project&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;ContactList&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;default&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;build-dotnet&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;import&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;file&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;build-properties.xml&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;import&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;file&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;sharpen-common.xml&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;build-dotnet&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;depends&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;sharpen&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;exec&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;executable&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;${nant.exe}&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;exec&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;sharpen&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;depends&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;init&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;br&gt;        &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;prepare-sharpen-workspace&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;project&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;ContactList&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;dir&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;${sharpen.workspace.dir}&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;br&gt;        &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;sharpen&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;workspace&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;${sharpen.workspace.dir}&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;resource&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;ContactList/src&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;sharpen&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;init&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;br&gt;        &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;reset-dir&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;dir&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;${sharpen.workspace.dir}&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;project&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Here we are using the common strategy of externalizing environment specific properties to a dedicated file (build-properties.xml): &lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;project&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;build&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;properties&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;property&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;sharpen.workspace.dir&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;value&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;build&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;property&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;eclipse.home&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;value&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;c:/java/eclipse&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;property&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;nant.exe&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;value&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;c:/dotnet/nant-0.85/bin/NAnt.exe&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;project&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;We're not using a plain java properties file because the &lt;a href="http://nant.sourceforge.net/"&gt;nant&lt;/a&gt; script which is used for compiling the converted sources also needs some of these definitions: &lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#0099ff"&gt;&lt;b&gt;&amp;lt;?&lt;/b&gt;&lt;/font&gt;&lt;font color="#0099ff"&gt;&lt;b&gt;xml&lt;/b&gt;&lt;/font&gt;&lt;font color="#0099ff"&gt;&lt;b&gt; &lt;/b&gt;&lt;/font&gt;&lt;font color="#0099ff"&gt;&lt;b&gt;version="1.0"?&lt;/b&gt;&lt;/font&gt;&lt;font color="#0099ff"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;project&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;ContactList&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;default&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;build&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;include&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;buildfile&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;build-properties.xml&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;property&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;src.dir&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;value&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;${sharpen.workspace.dir}/ContactList.net&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;property&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;bin.dir&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;value&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;${src.dir}/bin&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;build&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;csc&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;exe&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;output&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;${bin.dir}/ContactList.exe&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;sources&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;basedir&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;${src.dir}&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;                &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;include&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;**/*.cs&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#0000ff"&gt; &lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;sources&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;csc&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#0000ff"&gt;/&lt;/font&gt;&lt;font color="#0000ff"&gt;project&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Running ant we get good news and bad news. The good news are sharpening went fine: 
&lt;/p&gt;&lt;blockquote&gt;
&lt;pre&gt;sharpen:&lt;br&gt;[mkdir] Created dir: build\ContactList&lt;br&gt; [copy] Copying 2 files to build\ContactList&lt;br&gt; [echo] org.eclipse.core.launcher.Main -data build -application sharpen.core.application ContactList/src&lt;br&gt; [java] project: ContactList&lt;br&gt; [java] source folder: src&lt;br&gt; [java] Pascal case mode: None&lt;br&gt; [java] Console.java&lt;br&gt; [java] Program.java&lt;br&gt; [java] Conversion finished in 3110ms.&lt;br&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;C# compilation didn't go so well: 
&lt;/p&gt;&lt;blockquote&gt;
&lt;pre&gt;[exec] [csc] Compiling 2 files to 'ContactList.net\bin\ContactList.exe'.&lt;br&gt;[exec] [csc] ContactList.net\src\contacts\Console.cs(15,16): error CS0246: The type or namespace name 'java' could not be found (are you missing a using directive or an assembly reference?)&lt;br&gt;&lt;br&gt;...&lt;br&gt;&lt;br&gt;[exec] [csc] ContactList.net\src\contacts\Program.cs(12,16): error CS0117: 'string' does not contain a definition for 'isEmpty'&lt;br&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Before we fix those errors let's take a look at how Program.java got translated to c#: &lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#009966"&gt;&lt;b&gt;namespace&lt;/b&gt;&lt;/font&gt; contacts&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; Program&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Main&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;[&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;]&lt;/b&gt;&lt;/font&gt; args&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#0099ff"&gt;&lt;b&gt;bool&lt;/b&gt;&lt;/font&gt; running &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#cc00cc"&gt;true&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;while&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;running&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                &lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt; option &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; contacts&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Console&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;font color="#9966ff"&gt;prompt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;(a)dd&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;new&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;entry,&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;(l)ist&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;entries,&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;(q)uit&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;br&gt;                    &lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                &lt;font color="#006699"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;option&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;font color="#9966ff"&gt;isEmpty&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                    &lt;font color="#006699"&gt;&lt;b&gt;continue&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                &lt;font color="#006699"&gt;&lt;b&gt;switch&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;option&lt;font color="#000000"&gt;&lt;b&gt;[&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;]&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                    &lt;font color="#006699"&gt;&lt;b&gt;case&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt;q&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                    &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                        running &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#cc00cc"&gt;false&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                        &lt;font color="#006699"&gt;&lt;b&gt;break&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;                    &lt;font color="#006699"&gt;&lt;b&gt;default&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                    &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                        System&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Console&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Out&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;font color="#9966ff"&gt;WriteLine&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;+&lt;/b&gt;&lt;/font&gt; option &lt;font color="#000000"&gt;&lt;b&gt;+&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;DOES&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;NOT&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;COMPUTE!&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                        &lt;font color="#006699"&gt;&lt;b&gt;break&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;It looks good except for javaisms like the lower case namespace and method names which can be fixed with the introduction of the "pascalCase+" sharpen command line option. &lt;/p&gt;

&lt;p&gt;To get rid of the c# compilation errors we must provide a platform specific version of the Console class and tell sharpen to ignore its java counterpart using the @sharpen.ignore javadoc annotation. 
&lt;/p&gt;&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#6600cc"&gt;/**&lt;/font&gt;&lt;br&gt;&lt;font color="#6600cc"&gt; &lt;/font&gt;&lt;font color="#6600cc"&gt;*&lt;/font&gt;&lt;font color="#6600cc"&gt; &lt;/font&gt;&lt;font color="#6600cc"&gt;@sharpen&lt;/font&gt;&lt;font color="#6600cc"&gt;.&lt;/font&gt;&lt;font color="#6600cc"&gt;ignore&lt;/font&gt;&lt;br&gt;&lt;font color="#6600cc"&gt; &lt;/font&gt;&lt;font color="#6600cc"&gt;*/&lt;/font&gt;&lt;br&gt;&lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; Console &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;    ...&lt;br&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;As a very useful convention we like to keep native and converted c# sources separate from each other by introducing a subfolder named "native". &lt;/p&gt;

&lt;p&gt;Here's our native c# Console implementation: 
&lt;/p&gt;&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#009966"&gt;&lt;b&gt;namespace&lt;/b&gt;&lt;/font&gt; Contacts&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; Console&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Prompt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt; message&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            System&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Console&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;font color="#9966ff"&gt;WriteLine&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;message&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; System&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Console&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;font color="#9966ff"&gt;ReadLine&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;The remaining compiler error is caused by calling the String.isEmpty which has no equivalent on the .net side. We'll sneak around this issue for the time being by rewriting the java side condition in terms of String.length: 
&lt;/p&gt;&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;            &lt;font color="#006699"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;option.&lt;font color="#9966ff"&gt;length&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff0000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;continue&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Our build runs green now and the .net application is functional. We're ready to move on to the business logic. &lt;/p&gt;

&lt;p&gt;We'll start with a collection based implementation to be enhanced with persistence later in the process. 
&lt;/p&gt;&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#009966"&gt;&lt;b&gt;package&lt;/b&gt;&lt;/font&gt; contacts;&lt;br&gt;&lt;br&gt;&lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; Contact &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; String _name;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; String _email;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Contact&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;String name, String email&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        _name &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; name;&lt;br&gt;        _email &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; email;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; String &lt;font color="#9966ff"&gt;name&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; _name;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; String &lt;font color="#9966ff"&gt;email&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; _email;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#009966"&gt;&lt;b&gt;package&lt;/b&gt;&lt;/font&gt; contacts;&lt;br&gt;&lt;br&gt;&lt;font color="#009966"&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt; java.util.*;&lt;br&gt;&lt;br&gt;&lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; ContactList &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; List&lt;font color="#000000"&gt;&lt;b&gt;&amp;lt;&lt;/b&gt;&lt;/font&gt;Contact&lt;font color="#000000"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt; _entries &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; ArrayList&lt;font color="#000000"&gt;&lt;b&gt;&amp;lt;&lt;/b&gt;&lt;/font&gt;Contact&lt;font color="#000000"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;add&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;Contact contact&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        _entries.&lt;font color="#9966ff"&gt;add&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;contact&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; Iterable&lt;font color="#000000"&gt;&lt;b&gt;&amp;lt;&lt;/b&gt;&lt;/font&gt;Contact&lt;font color="#000000"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;entries&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; _entries;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#009966"&gt;&lt;b&gt;package&lt;/b&gt;&lt;/font&gt; contacts;&lt;br&gt;&lt;br&gt;&lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; Program &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; ContactList _contacts &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;ContactList&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;    &lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;readEvalLoop&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#0099ff"&gt;&lt;b&gt;boolean&lt;/b&gt;&lt;/font&gt; running &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#cc00cc"&gt;true&lt;/font&gt;;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;while&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;running&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            String option &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;prompt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;(a)dd&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;new&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;entry,&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;(l)ist&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;entries,&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;(q)uit:&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;option.&lt;font color="#9966ff"&gt;length&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff0000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;continue&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;switch&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;option.&lt;font color="#9966ff"&gt;charAt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff0000"&gt;0&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;case&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt;a&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;:&lt;br&gt;                &lt;font color="#9966ff"&gt;addEntry&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;                &lt;font color="#006699"&gt;&lt;b&gt;break&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;                &lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;case&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt;l&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;:&lt;br&gt;                &lt;font color="#9966ff"&gt;listEntries&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;                &lt;font color="#006699"&gt;&lt;b&gt;break&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;                &lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;case&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt;q&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;:&lt;br&gt;                running &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#cc00cc"&gt;false&lt;/font&gt;;&lt;br&gt;                &lt;font color="#006699"&gt;&lt;b&gt;break&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;default&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;br&gt;                System.out.&lt;font color="#9966ff"&gt;println&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;+&lt;/b&gt;&lt;/font&gt; option &lt;font color="#000000"&gt;&lt;b&gt;+&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;'&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;DOES&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;NOT&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;COMPUTE!&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;            &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; String &lt;font color="#9966ff"&gt;prompt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;String message&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; Console.&lt;font color="#9966ff"&gt;prompt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;message&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;listEntries&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;for&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;Contact c : _contacts.&lt;font color="#9966ff"&gt;entries&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            System.out.&lt;font color="#9966ff"&gt;println&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;c.&lt;font color="#9966ff"&gt;name&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;+&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;+&lt;/b&gt;&lt;/font&gt; c.&lt;font color="#9966ff"&gt;email&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;+&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;&amp;gt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;addEntry&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        String name &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;prompt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;Name:&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;        String email &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;prompt&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#ff00cc"&gt;Email:&lt;/font&gt;&lt;font color="#ff00cc"&gt; &lt;/font&gt;&lt;font color="#ff00cc"&gt;"&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;        _contacts.&lt;font color="#9966ff"&gt;add&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#006699"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Contact&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;name, email&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;static&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;main&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;String[] args&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Program&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;.&lt;font color="#9966ff"&gt;readEvalLoop&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;A quick look at the converted object model shows that although correct the code still looks a bit alien to .net: 
&lt;/p&gt;&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#009966"&gt;&lt;b&gt;namespace&lt;/b&gt;&lt;/font&gt; Contacts&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; Contact&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt; _name&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt; _email&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Contact&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt; name&lt;font color="#000000"&gt;&lt;b&gt;,&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt; email&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            _name &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; name&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            _email &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; email&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;virtual&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Name&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; _name&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;virtual&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;string&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Email&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; _email&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;&lt;font color="#009966"&gt;&lt;b&gt;namespace&lt;/b&gt;&lt;/font&gt; Contacts&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt; ContactList&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;private&lt;/b&gt;&lt;/font&gt; System&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Collections&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Generic&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;IList&lt;font color="#000000"&gt;&lt;b&gt;&amp;lt;&lt;/b&gt;&lt;/font&gt;Contacts&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Contact&lt;font color="#000000"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt; _entries &lt;font color="#000000"&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;new&lt;/b&gt;&lt;/font&gt; System&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Collections&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Generic&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;List&lt;br&gt;            &lt;font color="#000000"&gt;&lt;b&gt;&amp;lt;&lt;/b&gt;&lt;/font&gt;Contacts&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Contact&lt;font color="#000000"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;virtual&lt;/b&gt;&lt;/font&gt; &lt;font color="#0099ff"&gt;&lt;b&gt;void&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Add&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;Contacts&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Contact contact&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            _entries&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;&lt;font color="#9966ff"&gt;Add&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;contact&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;br&gt;        &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; &lt;font color="#006699"&gt;&lt;b&gt;virtual&lt;/b&gt;&lt;/font&gt; System&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Collections&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Generic&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;IEnumerable&lt;font color="#000000"&gt;&lt;b&gt;&amp;lt;&lt;/b&gt;&lt;/font&gt;Contacts&lt;font color="#000000"&gt;&lt;b&gt;.&lt;/b&gt;&lt;/font&gt;Contact&lt;font color="#000000"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;Entries&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/font&gt;&lt;br&gt;            &lt;font color="#006699"&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt; _entries&lt;font color="#000000"&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;        &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;    &lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;&lt;br&gt;&lt;font color="#000000"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/font&gt;
&lt;/font&gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;Contact.Name, Contact.Email and ContactList.Entries would look better as properties and the qualified names used everywhere look rather untidy. &lt;/p&gt;

&lt;p&gt;We can solve the first issue using the @sharpen.property javadoc annotation: 
&lt;/p&gt;&lt;blockquote&gt;
&lt;pre&gt;&lt;font color="#000000"&gt;    &lt;font color="#6600cc"&gt;/**&lt;/font&gt;&lt;br&gt;&lt;font color="#6600cc"&gt;    &lt;/font&gt;&lt;font color="#6600cc"&gt; &lt;/font&gt;&lt;font color="#6600cc"&gt;*&lt;/font&gt;&lt;font color="#6600cc"&gt; &lt;/font&gt;&lt;font color="#6600cc"&gt;@sharpen&lt;/font&gt;&lt;font color="#6600cc"&gt;.&lt;/font&gt;&lt;font color="#6600cc"&gt;property&lt;/font&gt;&lt;br&gt;&lt;font color="#6600cc"&gt;    &lt;/font&gt;&lt;font color="#6600cc"&gt; &lt;/font&gt;&lt;font color="#6600cc"&gt;*/&lt;/font&gt;&lt;br&gt;    &lt;font color="#006699"&gt;&lt;b&gt;public&lt;/b&gt;&lt;/font&gt; Iterable&lt;font color="#000000"&gt;&lt;b&gt;&amp;lt;&lt;/b&gt;&lt;/font&gt;Contact&lt;font color="#000000"&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt; &lt;font color="#9966ff"&gt;entries&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt; &lt;font color="#00000