Hi Tim,
Thanks for this. Have you personally run into problems sharing code as I
described?
I also immediately thought about avoiding sharing code that involves
controls. But today I noticed that both a Windows.Forms form and a Mobile
Device form each have the identical 'using' statement at the top:
using System.Windows. Forms;
It'll be interesting to see if a DataLibrary with the above 'using'
statement would support code as follows for both platforms:
private void GetAllControls( Control.Control Collection parent, ArrayList
container)
{
foreach(Control c in parent)
{
if(c.HasChildre n)
{
GetAllControls( c.Controls,cont ainer);
}
container.Add(c );
}
}
I definitely need to do some tests, but added my post on here to tap into
the experiences of others who have tried this.
Robert
"Tim Wilson" wrote:
My suggestion would be to only share code that is non-UI related and if you
really want to share assemblies make sure that the code conforms to the
lowest common denominator by compiling against the Compact Framework.
--
Tim Wilson
..Net Compact Framework MVP
"Robert W." <Ro*****@discus sions.microsoft .com> wrote in message
news:26******** *************** ***********@mic rosoft.com... I'm embarking on a project that will have both a desktop application and a
Pocket PC application. It seems logical to have as much code as possible
sitting in a shared project, which would be referenced and utilized by
both the Windows Forms application and the Mobile Device application.
Are there any "gotchas" (ie. warnings) that anyone knows about in
following this approach?
Robert W.
Vancouver, BC