.net

Enterprise Library Validation Application Block and Internationalization

Scenario A .NET/WPF desktop application should be localized (or in MS terms globalized) to a different language than English. That is, the UI needs to be adopted completely (labels, icons, ...). Log file entries, audit trail entries, and other outputs of the application, however, should remain in English to allow the English-speaking ...

DataAdapter: Is it possible to fill a Collection-Type instead of a DataTable/DataSet?

Hello, this is more a theoretical question i asked myself. I remembered that BinarySearch of an ordered List(Collection in general) is faster than finding Rows with Datatable.Rows.Find or DataTable.FindByPK with a primary key value. Hence i fill a Datatable from Database in a shared constructor and immediately after that a List(of Int3...

Swap input character to WPF TextBox before it is added to the Text

I have a TextBox which I'm using to handle numbers. I therefore only accept [0-9.,]. However, "." is the only valid decimal separator. I therefore only want this in my text, but I want to accept "," too, and swap it with a "." such that the displayed character is a valid one. So - how do I swap an input character? I'm assuming I can fe...

msdeploy/Web Deployment Tool deploying too many files

Hi, We're using msdeploy to deploy our sites to various environments from our continuous integration server. When the artifacts are deployed manually to the dev site from the command line. The deployment only pushes changed files and is very quick. However, when we push to our test or live environments the deployment copies a lot of f...

.Net assembly issue

Hello everyone, I am using Windows Server 2008 Enterprise + .Net 3.5 + VSTS 2008 + C# to develop a console application. The application runs fine on my developer desktop. But when I run the same application on another machine (Windows Server 2008 Enterprise as well, but no VSTS 2008 installed), there is error says assembly Microsoft.Exp...

E-commerce for .NET

Hello everyone, I'm looking for a product (e-commerce platform?) that would allow recruiters to purchase entries in a job search website. The technical stack includes .NET 3.5 and an Oracle or SqlServer database There will be 8 different kind of advertisings and there is the possibility to choose certain parameters in order to person...

Convert C# classes (class library) to SQL DDL (tables)

I have to convert a set of C# classes (class library) to SQL tables to be used by SQL Server, so that the data can be stored in a database and manipulated through the database. The problem is that the number of these classes is big (more than 1000 classes), and it would take a long time to setup manually such a database schema (tables,...

Can we have Class.Empty Object like we have in String.Empty

Hello, I am using .NET 3.5. I am creating a simple class and wants to make sure that the class after processing should not be null or should not be a new too.. So if we can just Test it like that Dim objClass as new Class() ' do some processing with the class ' ' and then.. check that if this object returned is not empty ' If (objCl...

How to find the source property based on the name of a flattened property with AutoMapper

I'm using AutoMapper and I'd like it to trace back a source property based on the name of the mapped (flattened) destination property. This is because my MVC controller has the name of a mapped property that it needs to provide to a service call that for sorting purposes. The service needs to know the name of the property that the mappi...

Is Repository pattern an overkill

I have been using Repository pattern (DDD and POEAA) for some time. However some of our team members have argued that it is just an extra layer of abstraction and unnecessary. I can seen some benefit in their arguments. Modern ORM solutions (NHibernate or EF) have almost everything you need. I searched and found some article like this an...

MP3Gain like volume analyzer software for WAV files

Hi Guys, Coding Language: C# Framework: .NET We have built a software, which among many other things, combines mp3 files. We are using a software called mp3Gain in our application. MP3Gain analyzes and adjusts mp3 files so that they have the same volume. Now we are also combining "wav" files. Would like to know if there is a similar s...

How to add attributes to xml using XmlDocument in c# .net CF 3.5

Hi, I need to create an attribute "abc" with the prefix "xx" for an element "aaa". The following code adds the prefix but it also adds the namespaceUri to the element. Required Output: <mybody> <aaa xx:abc="ddd"/> <mybody/> My Code: XmlNode node = doc.SelectSingleNode("//mybody"); XmlElement ele = doc.CreateElement("aaa"); X...

Parsing a TeamCity (Java?)-generated timestamp in .NET?

I'm attempting to integrate with the TeamCity REST API. It contains timestamps of the form 20100804T104413+0100. It's almost ISO 8601, but doesn't contain the hyphens. How do I convert this from a string to a DateTime in .NET? I've tried: DateTime.ParseExact(s, "yyyyMMddTHHmmss+zzzz", CultureInfo.InvariantCulture); (and without the +...

Change Page when entering fullscreen mode

Hi, my problem is quite simple: when user changes selection in a ListBox, I need my app to go to fullscreen mode, but I need to change the displayed page. I use Silverlight 4 private void MainListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { PresentationPage currentPresentationPage = new Presentatio...

Visual studio 2008 - Clearcase integration Checkout issue

I've integrated clearcase plugin to visual studio 2008. I'm facing problem with unreserved checkout option with plugin. I modified, TOOLS -> options -> Rational clearcase -> clearcase user options . I removed the check "Reserved" under "operations" tab. I click OK. After this setting , I selected a file to checkout --> a popup asking ...

ASP.NET Website Memory Usage quite high

Hi All, I have my website written using ASP.NET. If I let it, the website will hit about 2gb physical memory used within about 3-4 days which to me sounds really bad. At the moment, I have told IIS to restart the process when it hits 500mb just to keep it under wraps but I would like to try and track down the problem. When creating a ...

Update DatagridView Cell Background color based on row data

Hi I got a DatagridView and I would like it to change background color depending on the data in each row. Ex. | Person 1 | Person 2 | Person 3 | |----100----|---200-----|-----150----| |----300----|---100-----|------50----| In the first row I would like it to make "100" have a red background color and "200" green. Or. The lowest val...

Event Handlers in Constructors - Is it Possible or Even Wise?

I have an object that can take anywhere from a split second to a couple of minutes to initialize. The reason being is that the constructor retrieves data from a webservice that could be a few kilobytes to several megabytes, and depending on the user's connection speed performance may vary greatly. For that reason I am wanting to put ev...

Why might System.Threading.dll be missing from Windows\Assembly?

I've various versions of the .NET Framework (versions 1.1 thru 4.0) installed on a remote machine running XP Professional. I've installed Reactive Extension too for good measure. I also have an application which works on my machine because it references System.Threading found here: C:\Program Files\Microsoft Reactive Extensions\redist\...

Ria services reference is missing from silverlight 4 on VS2010

I'm walking through a tutorial for Ria services and Silverlight 3 however my coding environment is VS2010 (with .Net 4.0 and SL4). The tutorial references system.web.ria and I can't find that reference at all in the Add References window for VS2010. ...