.net

How to read/write dBase III files using C#/.NET ODBC or OLE?

I have searched for various techniques on how to read/write dBase III (dbf) files using OLEDB or ODBC with C#/.NET. I have tried almost all of the tecniques posted, but without success. Can someone point me in the right direction? Thanks for your time. ...

Grabbing Users with a specific value in their profile

I'm using membership and roles for authentication in my vb .net application. We have about 5 roles in the application with certain roles filling out a specific profile value. Example is the role is store and the profile value is store number. Obviously if you work for headquarters you don't have a store number so I don't care about it. E...

How to stop CAS security demands from a FullTrust assembly

I have a FullTrust assembly, Assembly A, which calls a 3rd party component, Assembly B. Is there any way I can, via A.dll.config or in A's code, prevent any CAS demands from propagating up the stack to Assembly B, which does not have FullTrust? I do not want to alter the machine's security policy, if possible. ...

Text on a ProgressBar in WPF

This may be a no-brainer for the WPF cognoscenti, but I'd like to know if there's a simple way to put text on the WPF ProgressBar. To me, an empty progress bar looks naked. That's screen real estate that could carry a message about what is in progress, or even just add numbers to the representation. Now, WPF is all about containers and e...

Using xsd to generate XML in .net

I'm working in a .net application where we need to generate XML files on the fly based on the dataset retrieved from the db. XML schema should be based on a xsd provided. I would like to know is there any way to bind or associate a dataset or each datarow with the xsd. I dont know whether it can be done at all or i may be thinking usage ...

How/When to abandon the use of Arrays in c#.net?

I've always been told that adding an element to an array happens like this: An empty copy of the array+1element is created and then the data from the original array is copied into it then the new data for the new element is then loaded If this is true, then using an array within a scenario that requires a lot of element act...

how to put an .net application in system tray when minimized?

can anyone please suggest a good code example of vb.net/c# code to put the application in system tray when minized. ...

Parsing SQL in .NET

I'm trying to build a .NET Managed data provider and I need to be able to parse SQL commands. What are good, free (as in beer) objects to do this? - I haven't seen any standard .NET assemblies for this yet. Thanks, Eli. ...

Good way to time SQL queries when using Linq to SQL

Is there a good way to time SQL queries when using Linq to SQL? I really like logging feature, but it would be great if you could somehow also time that query. Any ideas? ...

How to remove xmlns attribute with .NET XML API

XmlElement.Attributes.Remove* methods are working fine for arbitrary attributes resulting in the removed attributes being removed from XmlDocument.OuterXml property. Xmlns attribute however is different. Here is an example: XmlDocument doc = new XmlDocument(); doc.InnerXml = @"<Element1 attr1=""value1"" xmlns=""http://mynamespace.com/""...

Should my C# .NET team migrate to Windows Presentation Foundation?

We make infrastructure services (data retrieval and storage) and small smart client applications (fancy reporting mostly) for a commercial bank. Our team is large, 40 odd contractual employees that are C# .NET programmers. We support 50 odd applications and systems that we have developed. A few members of the team began making WPF, WF ...

How does the Multiview control handle its Viewstate?

Does the Multiview control contain the viewstate information for each of its views regardless of whether or not the view is currently visible? ...

Rhino Mocks: Is there any way to verify a constraint on an object property's property?

If I have class ObjA { public ObjB B; } class ObjB { public bool Val; } and class ObjectToMock { public DoSomething(ObjA obj){...} } Is there any way to define an expectation that not only will DoSomething get called but that obj.B.Val == true? I have tried Expect.Call(delegate { mockObj.DoSomething(null);}).Constraints(n...

.NET XML Seralization

I'm working on a set of classes that will be used to serialize to XML. The XML is not controlled by me and is organized rather well. Unfortunately, there are several sets of nested nodes, the purpose of some of them is just to hold a collection of their children. Based on my current knowledge of XML Serialization, those nodes require ...

Can I alter how types are resolved and instantiated in .NET?

In some languages you can override the "new" keyword to control how types are instantiated. You can't do this directly in .NET. However, I was wondering if there is a way to, say, handle a "Type not found" exception and manually resolve a type before whoever "new"ed up that type blows up? I'm using a serializer that reads in an xml-ba...

Is there a way to dynamically load a properties file in NAnt?

I want to load a different properties file based upon one variable. Basically, if doing a dev build use this properties file, if doing a test build use this other properties file, and if doing a production build use yet a third properties file. ...

App referencing Microsoft.SqlServer.Smo requires additional assemblies to be included on Target Machine?

I have a small app which references the Microsoft.SqlServer.Smo assembly (so I can display to the user a list of servers & databases to which they can connect). My application originally referenced Microsoft.SqlServer.Smo and Microsoft.SqlServer.ConnectionInfo. Things worked as expected on my dev box. When I installed the application o...

wsdl.exe Error: Unable to import binding '...' from namespace '...'

When running wsdl.exe on a wsdl I created, I get this error: Error: Unable to import binding 'SomeBinding' from namespace 'SomeNS'. - Unable to import operation 'someOperation'. - These members may not be derived. I'm using the document-literal style, and to the best of my knowledge I'm following all the rules. To sum it up, I have a...

Performance Testing

Hey all, We are developing automated regression tests using VMWare and NUnit. We have divided tests into steps and now I would like to see each step be examined for performance regression. Simply timing the tests, as NUnit does, does not seem reliable. I have figured in a acceptance factor of about 15% but our steps can differ sometimes ...

Blocking dialogs in .NET WebBrowser control

I have a .NET 2.0 WebBrowser control used to navigate some pages with no user interaction (don't ask...long story). Because of the user-less nature of this application, I have set the WebBrowser control's ScriptErrorsSuppressed property to true, which the documentation included with VS 2005 states will [...]"hide all its dialog boxes th...