.net

Image stretching and resizing

I have a picture that I need to resize to a specific dimension and then move one of the corner to a place higher than before so the image is not rectangular anymore but some kind of polygon. Is there a library that could help me with this kind of image manipulation or does someone knows the name of this operation? This is for a .NET app...

ASP.NET HttpApplication.EndRequest event not fired

According this MSDN article HttpApplication.EndRequest can be used to close or dispose of resources. However this event is not fired/called in my application. We are attaching the handler in Page_Load the following way: HttpContext.Current.ApplicationInstance.EndRequest += ApplicationInstance_EndRequest; The only way is to use the Ap...

Best way to find all factors of a given number in C#

All numbers that divide evenly into x. I put in 4 it returns: 4, 2, 1 edit: I know it sounds homeworky. I'm writing a little app to populate some product tables with semi random test data. Two of the properties are ItemMaximum and Item Multiplier. I need to make sure that the multiplier does not create an illogical situation where b...

WinForms: Proper way to change number of rows in a TableLayoutPanel

i'm trying to change the number of rows in a TableLayoutPanel programatically (sometimes it needs to be four, sometimes five, and rarely six). Unfortunatly changing the number of rows does not keep the RowStyles collection in sync, so you are then not able to set the height of the newly added rows. The following test code demonstrates t...

Is a Collection of Collections possible and/or the best way? C# .Net 3.5

I have created a class for a dashboard item which will hold information such as placement on the dashboard, description, etc. I am currently using a pair of Collections to hold those dashboard items contained in the "library" and those items showing on the dashboard itself. I have been asked to make this dashboard multi-tab, and my fir...

Books about the CLR

I'm interested in learning more about the .NET CLR internals and how the language is abstracted away. Can anyone recommend a book or two? Thanks. ...

Securing .NET application with keys

Hi, I am at the point where I need to add keys to my app. What are some of the possible solutions you guys used? I've looked at an earlier post so far, anything else before I decide. My 2 influencial factors are: Price Ease of use Thanks ...

Why is a left parenthesis being escaped in this Regex?

I'm using an HTML sanitizing whitelist code found here: http://refactormycode.com/codes/333-sanitize-html I needed to add the "font" tag as an additional tag to match, so I tried adding this condition after the <img tag check if (tagname.StartsWith("<font")) { // detailed <font> tag checking // Non-escaped expression (for tes...

What classes from Jeffrey Richter's PowerThreading library are people using?

Jeffrey Richter is looking for some input on how people are using his PowerThreading library. If anyone out there is using this, what parts of it are you using? He is looking to clean up the library and wants to know what classes people are using. http://www.wintellect.com/PowerThreading.aspx EDIT: See http://tech.groups.yahoo.com/grou...

Is there a notification mechanism for when a dependency property has changed?

In a Silverlight application I'm trying to find out when a property on a usercontrol has changed. I'm interested in one particular DependencyProperty, but unfortunately the control itself doesn't implement INotifyPropertyChanged. Is there any other way of determining if the value has changed? ...

Launching a Application (.EXE) from C#?

How can I launch a application using C#? Requirements: MUST work on XP and VISTA? I have seen a sample from DinnerNow.net sampler that only works in vista? ...

Get Binary data from a SQL Database

Hi hope some one can help. I have an ASP .Net (3.5) website. I have the following code that uploads a file as a binary to a SQL Database: Print(" protected void UploadButton_Click(object sender, EventArgs e) { //Get the posted file Stream fileDataStream = FileUpload.PostedFile.InputStream; ...

Launching a ClickOnce Deployed Windows application using VBScript

I have a ClickOnce deployed application I want to launch from VBScript, similar to launching Microsoft Word in the following example: Dim word Set word = CreateObject("Word.Application") word.Visible = True The problem is I don't know what parameter to pass into the CreateObject function to launch my application. Where would I find th...

How do you change the extension that .Net pages will run under?

I need my .net application to use the .html extension instead of .aspx I'm converting a php app and there are external applications which depend on that extension to function. What is the best way to do this? Thanks ...

How do you do end-of-week rounding on a date field in C# (without using LINQ)?

I have a weird date rounding problem that hopefully someone can solve. My client uses a work week that runs from Monday through Sunday. Sunday's date is considered the end of the week, and is used to identify all records entered in a particular week (so anything entered last week would have a WEEKDATE value of '10/26/2008', which is Su...

How to Programatically read the Documentation section of a WSDL in C#

i am using a WSDL file to create a the proxy class file, this service has a big Enumeration. the description for each enum value is in documentation section, how can i programatically read that section? ...

Would using Stack<T> is better than List<T> in terms of memory usage with .NET

So in a .NET app , i got about 2 million items that i need to hold them in memory for processing , 1 by 1, would holding these items in a Stack collection , is better than holding them in a List collection, assuming that the memory used by the stack object will be keep minimizing every time an item is poped out of the stack object , or t...

What is a good RDF library for .net?

I'm looking for a library that can deal with RDF and OWL data. So far I have found: semweb (no owl support for all I know) rowlex (more of a 'browser' application) Your recommendations: LinqToRdf (very interesting, thanks mark!) ...

Why use Hashtable.Synchronized?

From the MSDN documentation: "Synchronized supports multiple writing threads, provided that no threads are reading the Hashtable. The synchronized wrapper does not provide thread-safe access in the case of one or more readers and one or more writers." Source: http://msdn.microsoft.com/en-us/library/system.collections.hashtable.synchron...

Advantages and disadvantages of using Enterprise Library

Im just starting a project and since this project is personal I was wondering what are the advantages of using Enterprise Library? We use the version 2 for several projects in the office but im not quite sure (aside of the good practices) of the advantages of it, especially in the database component. Any advice? Thanks ...