.net

Is there an equivalent of Perl's URI.pm for C# / .NET?

.NET has the Uri class. Perl has its URI module. The major difference is that URI.pm allows you to retrieve the query string components as a hash, and set a hash into the URI to construct a nice URI with query arguments. I don't see anything like that on the .NET side. Is there some hidden class I don't know about? ...

ActiveX Print a web page

Possible Duplicate: ActiveX Print a web page I am new in activex, i want to write a activex with vb6 or .net (vb or c# is ok), the activex can print the web page without prompt the print dialog, the web page is the activex resided in. Now, I can write a activex in vb6, but cannot print a web page, I have tried many ways foun...

WinHttp.WinHttpRequest in .NET

Is there a built-in .NET class that can replace or work like WinHttp.WinHttpRequest? Thanks! ...

Are there any high level cross platform UI controls?

Hi there It's very common for business applications in .net world to use third party control sets like devxpress, componentOne etc. They give possibility to apply skinning, use controls with rich functionality etc. The problem arises when we want to port such application to other platforms - are there any controls that have their eg. l...

Memory Efficiency and Performance of String.Replace .NET Framework

string str1 = "12345ABC...\\...ABC100000"; // Hypothetically huge string of 100000 + Unicode Chars str1 = str1.Replace("1", string.Empty); str1 = str1.Replace("22", string.Empty); str1 = str1.Replace("656", string.Empty); str1 = str1.Replace("77ABC", string.Empty); // ... this replace anti-pattern might happen with upto 50 cons...

.NET Memory Profiling Tools

Hello, I am on the lookout for good .NET CLR memory profiling tools. My key requirement is that it will play well with IIS and standalone CLR Apps. Ideally I would see what objects are allocated, where they are allocated and what size they are? Does anyone have any good experiences with a particular tool that you would be happy to reco...

How can I use Application Settings in a mono project?

I'm trying to port an application to Mono, however Mono doesn't support "Application Settings". I don't and won't use Mono Develop, the development is done with Visual Studio. Is there any quick way to solve this? Or should I implement my own settings replacement class? If it matters this is a VB.NET application. ...

NUnit "could not load file or assemby 'MyTestProject'

I'm setting up a new 64 bit machine to run as a build server. When I try to load my NUnit test assembly into NUnit GUI I get the following error. There is nothing obvious missing, all the dependencies seem to be present. All the DLLs are compiled for the x86 platform. Using NUnit 2.4.7. I have tried upgrading to 2.4.8 but the same er...

Marketing a PowerShell/.NET open source project

How do I market a new open source project using .NET and PowerShell? The project has taken me around a years effort to get near completion, I'd appreciate some hints on how to get the word out. ...

NHibernate not persisting many-to-many relationship

Hello, I'm currently using NHibernate as my data access layer, using Fluent NHibernate to create the mapping files for me. I have two classes, TripItem and TripItemAttributeValue, which have a many-to-many relation between them. The mapping is as follows: public class TripItemMap : ClassMap<TripItem2> { public TripItemMap() { ...

Deploying WCF Client assembly in SQL2005

I'm trying to get a WCF Client assembly deploy in SQL 2005. This means I need to create/register the dependencies for my WCF Client, which are: System.Runtime.Serialization System.Web System.ServiceModel With this script: CREATE ASSEMBLY System_Runtime_Serialization FROM 'C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication...

How do I automatically delete tempfiles in c#?

Hello all. What are a good way to ensure that a tempfile is deleted if my application closes or crashes? Ideally I would like to obtain a tempfile, use it and then forget about it. Right now I keep a list of my tempfiles and delete them with an eventhandler that triggers on Application.ApplicationExit. Is there a better way? ...

Testing in Visual Studio Succeeds Individually, Fails in a Set

When I run my tests in Visual Studio individually, they all pass without a problem. However, when I run all of them at once some pass and some fail. I tried putting in a pause of 1 second in between each test method with no success. Any ideas? Thanks in advance for your help... ...

What does "T" mean in C#?

Duplicate of: http://stackoverflow.com/questions/361336/what-are-generics-in-c# I have a VB background and I'm converting to C# for my new job. I'm also trying to get better at .NET in general. I've seen the keyword "T" used a lot in samples people post. What does the "T" mean in C#? For example: public class SomeBase<T> where T : ...

Linq and DeleteAllOnSubmit pain

The following code loads a gig, clears out the gigs acts collection and then adds a new act. Data.LinqToSQL.Gig dbGig = DBContext.Gigs.Where(x => x.ID == myGigID).SingleOrDefault(); //Remove all references to the current acts if(dbGig.Acts!=null) { DBContext.Acts.DeleteAllOnSubmit(dbG...

Is there any way to inherit a class without constructors in .NET?

I'm currently trying to modify some HttpWebRequest functions, but I can't do it through inheritance because HttpWebRequest has no public constructors (besides the deserialization constructor). Is there a workaround to do this? My objective is to code something like the example below, but this class objects must inherit the HttpWebReques...

Circular References Cause Memory Leak?

I'm trying to run down a memory leak in a windows forms application. I'm looking now at a form which contains several embedded forms. What worries me is that the child forms, in their constructor, take a reference to the parent form, and keep it in a private member field. So it seems to me that come garbage-collection time: Parent ha...

VS2005 Configure "fallback" DLL

I'm trying to add SQL2008 support to a .NET 2.0 application. However, my unique constaint is that some users will still use SQL2005, and I don't want to require them to install the SQL2008 client components. The actual set of DLLs I need for SQL2008 are different than SQL2005. The code can remain the same. Botton line, I need a way i...

How to make a call to my WCF service asynchronous?

Hi, I have a WCF service that I call from a windows service. The WCF service runs a SSIS package, and that package can take a while to complete and I don't want my windows service to have to wait around for it to finish. How can I make my WCF service call asynchronous? (or is it asynchronous by default?) ...

What are some good start to finish .NET project tutorials online?

I am looking for projects that walk you through from start to finish, specifically in .NET. What are some that have especially increased your knowledge as a developer? Any .NET topic is fine as long as it is a start to finish project. As far as language is concerned, c# and asp.net are preferred. ...