.net

Question about memory leak in .NET

Hi, I have some memory leak in my C# code I have a class with some SqlCommand fields inside it. I also have an Initialize() public method that allocates these SqlCommands fields. Before the allocation I check (in the Initialize's code) whether it not the first time I do allocation (i.e not the first time Initialize is called) and if i...

How can I use my own connection class with a strongly typed dataset?

I have designed a class with sqlClient.SqlCommand wrappers to implement such functionality as automatic retries on timeout, Async (thread safety), error logging, and some sql server functions like WhoAmI. I've used some strongly typed datasets mainly for display purposes only, but I'd like to have the same database functionality that I ...

What's the use of chords?

Languages such as Nemerle support the idea of chords. I'd like to know what their practical use is. ...

Question concerning Win32 Console app vs. CLR Console app

Hello, I'm working on a C++ project that I don't intend to develop or deploy using .NET libraries or tools, which means it would make sense for me to create it using a Visual Studio Win32 Console application. However, I've heard that the debugging abilities when using a CLR application under Visual Studio are much more powerful. So I ...

Best practice to persist config/user info in .NET app

I have a low quantity of data to persist in my .NET app. For example, the file that has been opened last time when the user was around. What is the best practice to persist and retrieve information like that? A code sample would be appreciated. ...

Application pool in IIS 7 does not show .NET Framework 3.5

I've .NET Framework 3.5 SP1 installed on my system. When I create a new application pool, I just see the .NET Framework V2.0.xxx. I've a file that uses the ASP.NET MVC. It's not loading. I think this might be the reason. ...

Persisting/retrieving settings at runtime using .NET compact framework

I want to save/restore my settings of my Windows Mobile application in runtime. The amount of data is insignificant, using database is an overkill. What would be the best practice for a task like that? I thought of something similar as Settings : ApplicationSettingsBase class in .NET full framework, but it is not supported in the compac...

Why does the performance of the HttpWebRequest object improve while using Fiddler?

I'm getting some very strange behaviour with HttpWebRequest I hope someone can help me with. I have a console app which does some aggregation work by by using the HttpWebRequest object to retrieve the contents of a target website. Due to the nature of the requirement the app is multithreaded and attempts to make anywhere between 10 and 3...

NHibernate SchemaExport and Configure() catch-22

I want to use DDD in a new project and model my classes first, then generate the database schema based on the class library. My plan is to do this with the NHibernate hbm2ddl tool SchemaExport. The problem is that I can't get the SchemaExport to work because of a weird catch-22 problem it puts me in. The SchemaExport requires a Configur...

change default startup page Asp.net windows hosted godaddy

when I visit http://mywebsiteurl.com/ by default it will load Default.aspx, index.html, or welcome.html... I would like to know how I can make a directory point to index.ashx (or something else other then index.html) is it inside the web.config file? ...

ADO.NET Data Service not dynamically updating

My application is a client/server solution using an ADO.NET Data Service. The Data Service exposes transactionSummaryData as follows: public IQueryable<TransactionSummary> TransactionSummaries { get { return MainForm.transactionSummaryData.Items.AsQueryable(); } } The transactionSummaryData is of type TransactionSummaries whose it...

Real world use of custom .NET attributes

What kind of things have you used custom .NET attributes for in the real world? I've read several articles about them, but I have never used custom attributes. I feel like I might be overlooking them when they could be useful. EDIT I am talking about attributes that you create, not ones that are already included in the framework. ...

Implementing a virtual file system in .NET

A while back a found a great-looking framework that allowed .net developers to implement a virtual file system. I thought I had bookmarked it, but it seems I haven't. Does anyone know any frameworks for doing this? EDIT: Here's a hint... It had a catchy, short name and it's own domain. Sorry, that's all I can remember :p ...

Silverlight line of business applications

Ok I have been looking for some good examples of Line of business apps implemented in silverlight. I have come across a few bits on the net but nothing with any substance to it. The MS silverlight samples are cool for eye candy and stuff kind of like you see done in Flash but nothing that is true LOB lets actually make something useful ...

How do I set a ComboBox default *not in the drop down* when a list item begins with the same text as a drop down item?

Using C#, say you have a ComboBox that has a DropDownStyle set to DropDown (there are items in the drop down but the user can manually enter a value as well). How do you set a default value for the ComboBox that is not in the list of values in the drop down, but begins with text from a possible selection? Normally setting ComboBox.Text w...

Why can't I drag execution point in IntelliJ (I can in Visual Studio)

In Visual Studio, when debugging, one can drag the execution point (current instruction pointer, yellow dot) to another place in the current method. This is impossible in IntelliJ, and some have stated it's generally impossible in Java. Why? ...

How Print multipage WPF?

Hi, i have a visual and i wish print i multipage .i have more page to print out each content stay in the StackPanel(it will increase storing datacontext like a Report) i wish create like a pageBreak in the StackPanel to fix the pagesize so begin to print in one more page but i don't know how create this feature. Do you have nay advice ,...

recommend a tutorial to read Excel file in C#

Hello everyone, I have experience in C# but limited experience in using C# to read content from Excel. My task is very simple, just read each column of each row of an Excel document and retrieve their values. Any good tutorials or samples for a beginner? I am using VSTS 2008 + C# + .Net 3.5. I am working with Excel 2007. thanks in ad...

recommend a library/API to unzip file in C#

Hello everyone, Looks like no built-in Library/API in C# to unzip a zip file. I am looking for a free (better open source) library/API which could work with .Net 3.5 + VSTS 2008 + C# to unzip a zip file and extract all files into a specific folder. Any recommended library/API or samples? thanks in advance, George ...

How can I create an enumeration for colors in window forms application?

SO Commmunity I have come across a 'problem' that I think must be quite common and wondered if anybody could help. I am building a simple windows form (using VB.NET) for a friend to use at work. His company has about 10 specific colors schemes (they have list of RGB values) that they use for the company logo, website etc. I want to fo...