[Mono-list] Differences between Mono 1.2.6 and .NET 2.0
Daniel B. Hobbs
daniel.b.hobbs at gmail.com
Thu Jan 24 14:27:56 EST 2008
I am new to the list here and I am very impressed and excited about
the work that has been done so far. I am in the process of porting my
company's web application to run on Mono and as expected I have run
into a few issues.
The web application uses a web.sitemap file which we manipulate in
memory to display dynamic menus and breadcrumbs. The code we use
works in .NET 2.0 but when run on Mono a NotSupportedException("Can't
modify a readonly list." ) is thrown. It confuses me how this would
work on .NET but not on Mono.
Our code looks like this:
SiteMapNode clone = SiteMap.CurrentNode.Clone(true);
clone.Title = newTitle;
SiteMapNode parentNode = clone.ParentNode;
if(parentNode != null){
parentNode.ChildNodes.Clear();
... // do work on the child nodes
}
When I run the above code with the Visual Studio debugger the
clone.ParentNode.ChildNodes is NOT read-only, which makes sense as
it's an in memory copy and can be modified. If I'm wrong how else can
you change a SiteMapNode in memory? Maybe I'm missing something.
Thanks,
Daniel
More information about the Mono-list
mailing list