.net

XmlSerializer - Deserialize different elements as collection of same element

I have the following XML part which schema I can't change. NUMBER, REGION, MENTION, FEDERAL are columns: <COLUMNS LIST="20" PAGE="1" INDEX="reg_id"> <NUMBER WIDTH="3"/> <REGION WIDTH="60"/> <MENTION WIDTH="7"/> <FEDERAL WIDTH="30"/> </COLUMNS> I want to deserialize it to public List<Column> Columns {get;set;} property. So elem...

using exchange server account

I m developing ASP.Net project in company. Every user has an unique exchange account. Im trying to authenticate the user based on teh user's Exchange credentials for web project. I want to use exchange server account for each user. I just dont want to add users to database, because they already have userid and password in exchange serv...

What's the best way to tell if the mouse is over a form or not?

I figured out how to capture mouse clicks over the entire form, but this method doesn't translate well for MouseEnter and MouseLeave. My form layout is made up from many Panels and TableLayoutPanels so there's no all-encompassing control I can monitor events for, and obviously a MouseLeave event for a button doesn't mean the cursor left ...

Using C++ classes in .NET

I have a set of classes that I've written in C++ for a code base that will run in Linux commandline. They primarily use the STL and no fancy features of the language. They've been tested, and work. I need to write a GUI app for the .NET framework that does things using logic I've written in those classes, but run on Windows. A critic...

Mock Assertions on objects inside Parallel ForEach's???

Any idea how we can assert a mock object was called when it is being accessed inside Parallel.ForEach via a closure? I assume that because each invocation is on a different thread that Rhino Mocks loses track of the object? Pseudocode: var someStub = MockRepository.GenerateStub() Parallel.Foreach(collectionOfInts, anInt => someStub.Do...

.NET Workflow Custom Activity - Custom Property

Hello, I am trying to set up a custom activity for one of my workflows. I can easily setup a String property for my activity however I would like to have a custom property which is a list of objects. More precisely, I would like to build a custom activity to execute stored procedures. I have to have a property for the Stored proc name...

How to Implement AutoSize

I'm trying to figure out a good way to auto-size a Rectangle that has text drawn inside of it. I basically want the size to have a ratio of width/height and then "grow" according to that ratio to fit the text. I've looked at Graphics.MeasureString but I don't think it does what I'm looking for (maybe it does and I'm just using it wrong)....

Scrolling a Div programatically using say Javascript

Hi I have a jqgrid which is embedded in a Div. I am deleting records from the grid and reloading the grid using grid.Trigger('reload'). The width of the grid is considerably high so it has a scroll bar. Now I scrolled through the end of the grid horizontally before deleting records. Each time I delete the records and reload the grid, t...

Environment variables get lost between MSBuild projects

Hi, I have a .NET solution containing following projects: web application (WAP) web deployment (WDP, .wdproj) wix setup (WIX, .wixproj) In the WDP I've used a custom MSBuild task (SetEnvVar) to set some env. variables for further use in the build process. After setting them I can use them without prob. in the WDP but in the WIX th...

Error processing response in .net web service with WSE3 mutualCertificate10Security Assertion

I am securing a .net web service (framework 2.0) with WSE3 mutualCertificate10Security Assertion. When request are valid all is fine and the response is wellformed, but when the request is invalid (cause a invalid signature, failed check, or soapexception thrown), the web server isn't able to process the response to send to the client....

Unity doesn't work

Yesterday I've implemented the code: CustomerProductManager productsManager = container.Resolve<CustomerProductManager>(); It was compilable and working. Today (probably I've modified something I am constantly getting the error: The non-generic method 'Microsoft.Practices.Unity.IUnityContainer.Resolve(System.Type, string, par...

How do you create a nested LINQ Grouping / Lookups for a Collection of Objects

Given a list of objects with a date and decimal, I would like to index these objects by the year, month, dayofweek and hour of the date. In .NET 2.0, I would have created this graph using a set of nested dictionaries and a list as the leaf node. I am interested in how this could be done with LINQ. ...

Are there any performance enhancements by setting EnableTheming to false?

I have a site that will not use theming. But by default the value is set to true. Does ASP.NET do a check everytime to see if I'm using themes. Is there a performance hit? Thanks! paul ...

What Features Do You Want To See in .NET 5/C# 5?

Possible Duplicate: C# Language Speculation 4.5 / 5.0 .NET 4 and Visual Studio 2010 are finally here, along with a host of new features. But we wouldn't be who we are if we didn't long for a feature that didn't make the cut, or that was never even considered. So sound off and let the folks at Microsoft know: What features do ...

Workflow calling external executable

In windows workflow foundation, can a workflow call another executable to be launch? ...

How to ignore comments when reading a XML file into a XmlDocument?

Possible duplicate: How to remove all comment tags from XmlDocument Hello, I am trying to read a XML document with C#, I am doing it this way: XmlDocument myData = new XmlDocument(); myData.Load("datafile.xml"); anyway, I sometimes get comments when reading XmlNode.ChildNodes. For the benefit of who's experiencing the same requi...

XML .NET Library

Is it any XML .net library like simplexml in PHP? For example: <root> <obj> <val>value1</val> </obj> <obj> <val>value1</val> </obj> </root> objects = .....Parse(xml); Console.WriteLine(objects[0].val.ToString()); ...

Help with porting thread functionality: Win32 --> .Net

Hi, I am responsible for porting a class from legacy Win32 code to .Net and I have come across a threading model that I'm not sure how best to implement in .Net. Basically the Win32 has one worker thread, which calls WaitForMultipleObjects() and executes the particular piece of code when a particular object has been triggered. This has a...

Passing derived objects in a constructure

This is a bit of a convoluted question, hopefully I can make it clear. I am finding that this may not be possible, but am trying to see if anybody has a solution. I have four classes, two are core classes and two are those core classes extended: extUser Extends coreUser extSecurity Extends coreSecurity In the constructor for coreUse...

Is it feasible to do .NET development using Eclipse?

How feasible is it to use Eclipse to develop .NET applications? Is it best just to go with Visual Studio? Update: I am not especially concerned with the cost and I am using Windows, not linux. I am mostly trying to avoid having to use two different IDEs. Another way of asking this question is "are there any good Eclipse plugins for doi...