.net

.net framework version req'd for MS Sync Framework

Can anyone tell me what version of the .NET framework (CLR and BCL) is req'd for the recently-released MS Sync Framework (for support of occasionally-connected-applications)? Its listed as Sync Framework V1 for ADO.NET v2.0 but none of its listed req'ments say anything about the .NET fx version that is required to support it. Anyone go...

Runtime callable wrapper (RCW) scope - process or application domain?

What is the scope of Runtime Callable Wrapper (RCW), when referencing unmanaged COM objects? According to the docs: The runtime creates exactly one RCW for each COM object, regardless of the number of references that exist on that object. If I had to "guess" - this explanation should mean "one per process", but is it really? ...

When should you override OnEvent as opposed to subscribing to the event when inheritting

When should one do the following? class Foo : Control { protected override void OnClick(EventArgs e) { // new code here } } As opposed to this? class Foo : Control { public Foo() { this.Click += new EventHandler(Clicked); } private void Clicked(object sender, EventArgs e) { // ...

Why is F# so special?

In the microsoft and .net world, is there an industry trend towards F# and functional programming, moving away from C# and VB.NET? What is it about F# that is so special? What does it provide that C# does not provide? Does it mean you can code solutions faster and build in more features in the same time frame? Can you code more relia...

What are the limitations of Loose XAML?

I have been experimenting with WPF and rendering strict XAML markup in a web browser, also known as Loose XAML (explained here and here). It strikes me as mostly useful for displaying static content. However, it also appears possible to bind to an XML data provider. Loose XAML files are not compiled with an application, which create...

How to detect an update using .NET 2 System.Configuration.Install?

I created a class derived from System.Configuration.Install for my installer. But the code in Uninstall() is being called when I try to update the application. How can I detect that the user is trying to update instead of uninstall? Maybe this post explains it better than me: My problem boils down to: when the user performs an upd...

LINQ to XML for a small appliction can it replace a small database?

I am creating a small application that will be deployed on Window. The database will have less than 10 tables. Instead of installing a database on the client box is using XML documents for the database and LINQ going to cost in performance of queries, waiting for the XML file to be loaded and be written? If I use a database I will ...

How do I automatically update a web reference at build time?

I have a .net project that has a web reference to a service. I would like to update that web reference as part of every build. Is that possible? ...

Do objects added to the SqlException.Data collection need to be [Serializable]?

Do objects added to the SqlException.Data collection need to be [Serializable]? ...

Is it possible to interpolate my angle bracket, percent, equals <%= %> syntax in external javascript files?

Often times when mixing jquery with asp.net I need to use asp .net angle bracket percent, <% %>, syntax within a jquery selector. If I would like to seperate the javascript from markup into different files is there still a way to evaluate my javascript file so the angle bracket percents are interpolated before reaching the client brows...

log4net Configuration Section for NUnit Test Project

I am running NUnit with the project named AssemblyTest.nunit. The test calls another assembly which uses the log4net assembly. This is using nunit version 2.4.3 with the .net 2.0 framework. In TestFixtureSetup I am calling log4net.Config.XmlConfigurator.Configure( ) and am getting the following error: System.Configuration.Configuratio...

Synchronized ListViews in .Net

I'm working on a control to tie together the view from one ListView to another so that when the master ListView is scrolled, the child ListView view is updated to match. So far I've been able to get the child ListViews to update their view when the master scrollbar buttons are clicked. The problem is that when clicking and dragging t...

How do I make a ListView row draggable in .NET?

I am not the most experienced GUI programmer, so bear with me here. I have a custom list view. I would like to be able to drag a row from the ListView to another control on a form. I know how to catch events that are fired when an object is dragged to a control, but I am not sure how to make a row itself draggable. I could always hac...

Animating a custom Button ControlTemplate Foreground

I want to change/animate the Foreground property of a custom button control template depending on the control's state. Pre-RC0, I set the Foreground of the ContentPresenter, gave it an x:Name, and referenced it in the VisualStateManager transitions. Now, ContentPresenter no longer has a Foreground, since it doesn't inherit from Control...

Finding the time taken to send messages with WCF net.tcp

I’m writing a prototype WCF enabled distributed app, to try and find out any issues I’ll have upgrading my existing “sending xml over tcp to communicate” apps I’ve got. I’m using Callback Contracts to register clients with a server (Singleton in ServiceHost) and so far all the communications between client and server work. I can connec...

What's the difference between <%# %> and <%= %>?

Pardon my ASP ignorance, but what's the difference? ...

Static and Instance methods with the same name?

I have a class with both a static and a non-static interface in C#. Is it possible to have a static and a non-static method in a class with the same name and signature? I get a compiler error when I try to do this, but for some reason I thought there was a way to do this. Am I wrong or is there no way to have both static and non-static ...

Visual Studio 2005, how to get where project are used in a solution?

I have a solution with other 70 projects into it. My question is : How can I know where the project is used? I do not want to open all those 70 projects to verify the References one by one. How can I see which project use one project in particular? Edit I do not want to do 1 by 1 search in XML or in the Reference in VS. I would like a q...

What does a ListViewSubtemCollection use for its keys?

I am trying to get the value of some ListViewSubItems, but I have no idea what values it uses for its keys. I have some simple code: protected override void OnItemDrag(ItemDragEventArgs e) { base.OnItemDrag(e); ListViewItem item = e.Item as ListViewItem; string val = item.SubItems[???].ToStri...

Enumerated types as constants across web services?

I'm working on a project where I'm trying to avoid hard-coding DB IDs in a .NET service-oriented project. There are some instances where I need to set ID values through code but I don't want to just hard code the IDs since I've done that before and it lead to DB alignment nightmares when the auto-incrementing IDs were changed when the DB...