.net

Able to Delete Open Image Files in .NET

Hi, I have a small utility that deletes files from folders using .NET's FileInfo.Delete() method. Basically, I can catch an IOException if the file is currently open. This works for all files except for image files (JPG, GIF, BMP, ect.). When these types of files are open, the program is still able to delete them without throwing any...

Is there a way to have a Calendar Extender Restriction?

I have a calendar extendar issue that I seems tough for myself. I am trying to restrict my nifty feature to display the current month and the month prior ONLY. Is there anyone who can help with that? if possible ...

Passing variable number of parameters to Stored proc

I am trying to pass a variable amount of parameters into a MySql stored proc. I have done this in Sql Server by using xml or parsing a delimited list. I am guessing I could do the parsing of a list in MySql but are there other options? What I am trying to do is I have a configuration that stores a filter of data to return. The filter...

.NET datarow visualizer?

Are there any datarow visualizers which work in VS 2008? I have tried a couple (DotNetDan & Captator) and they both give cast exceptions. It seems these were developed for VS 2005. I know I can put a datarow in a datatable and view it through a datatable visualizer but I don't want to write code every time I want to inspect one. ...

Multidimensional Data Structure in C#

I want to build a data structure which is basically a matrix of strings with the following. A growable no of rows A FIXED no of columns I want to be able to get at whatever is in a particular row or column via a method call that takes the an integer row no and an int col number as an argument. In addition I want to be able to set the...

App to analyze folder sizes?? c# .net

Hi I have built a small app that allows me to choose a directory and count the total size of files in that directory and its sub directories. It allows me to select a drive and this populates a tree control with the drives immediate folders which I can then count its size! It is written in .net and simply loops round on the directori...

Parse response from FTP LIST command (syntax variations)

The FTP LIST command displays a listing of all the files and directories in the current working directory. The problem is, it returns several different formats depending on the server. Does anybody know of a .NET library that is able to parse the most popular formats? I am OK with a "try this regex, if it fails, try the next regex" app...

Debugging/solving MSDTC promotion error

What is the best way to attempt to debug and pinpoint the code causing a SQL transaction to be elevated to a DTC? I'm working with an existing API that is failing for me alone, so i believe it to be some kind of config error or something wacky. I'm not having much luck finding the culprit via debugger. Are there better ways to find the o...

NLog does not write to file on Vista deployment

I am using NLog for the first time on a project. I want to log to a file, so I added a target writing to fileName="${basedir}/logs/${shortdate}.log". This creates/appends log info to a file in MyApplicationFolder/Logs/2009-06-08.log. Logging works fine on a Windows XP machine, in debug mode, and when I deploy using my msi installer. Howe...

Analytics for windows applications

Are there any .net frameworks for collecting data similar to Google analytics, for example to know home many people use a specific feature, how many people launch the app, the only solution that i have found is EQATEC Analytics which is pretty good, but doesn't show which feather or which versions of the app are being used, based on the ...

Why isn't there a parallel to Java's setAccessible in .NET?

Take a look at setAccessible - a way in Java to let you call private methods by reflections. Why didn't .NET implement such a feature yet? ...

Fastest .Net and SQL data types

I hope this question isn’t too “right field” and I'll be upfront in saying I'm a newb compared to many people on stackflow... I want to compare object representations of images, audio and text for an AI project I am working on. I'd like to convert all three inputs into a single data type and use a central comparison algorithm to determi...

C#: Using .ico file with multiple images

I'm trying to set the images in a TreeView in C#, from a .ico file containing two icons: a 32x32 version and a 16x16 version. The images are setting, but .Net is choosing the 32x32 version, and scaling it down (which looks terrible) instead of choosing the readily available 16x16 image. The relevant code: ilTree.Images.Add(Properties.R...

Prevent AspxGridView from populating on loading page

I have AspxGridView on my page. I want users to be able to set up some data on the web form, and after they press one button, the data from screen is being read, validated and bussines object is being created. This object has a GetData() function, and returns an array of objects representing rows in a grid. I want ASPXGrid not to popul...

ReadOnlyCheckBox ControlTemplate

Hi, I've been trying to create my generic ReadOnlyCheckBox style/template but I'm having a problem with the binding to the data. In the example here: http://stackoverflow.com/questions/921921/a-read-only-checkbox-in-c-wpf you bind directly to the data from the ControlTemplate definition, but of course this is not really what I want, a...

System.ExecutionEngineException Failure

I've been trying to find out more about this problem and I'm not having much luck. I keep reading that applications should not have this error come up and although that's all fine and dandy, it doesn't tell me what can cause this error to show up. I know this question is very broad as I'm sure there can be multiple causes for this error...

How to perform a binary search on IList<T>?

Simple question - given an IList<T> how do you perform a binary search without writing the method yourself and without copying the data to a type with build-in binary search support. My current status is the following. List<T>.BinarySearch() is not a member of IList<T> There is no equivalent of the ArrayList.Adapter() method for List<T...

Are sequential numbers necessary?

Hi, I am working on a winform (.NET) application which includes Orders, Invoices, Service Orders, Ticketing etc. It it necessary for these enities to be sequential when numbering their IDs? IMO no. Take an order for instance, it can only be valid once it passes thorugh the business layer, during that proocess another order could've been...

Discover if .NET family update is installed

Microsoft has released a family update for .Net. It can be found here. Is there a way to find out if this update is installed on a PC using the .NET framework? ...

.net cf TextBox that displays keyboard on focus

I have a few text boxes on my UI that I want to display the mobile keyboard for when the control has focus, then go away. Note: for this particular program, it is a tall screen and has no physical keyboard on the device. ...