.net

Performance issue on the update of a DataTable bound to a Datagridview

I have a dataTable bound to a DatagrindView and would like to update a selected column. My DataTable(displayDT) and my datagridview1 have the same layout: DateTime item1 item2 item3 1/1/2010 100 100 100 1/1/2010 1:00 120 110...

Windows Azure Storage vs. SQL Azure

I saw that there was a similar question asked several months back, but it really didn't address my situation well. Here it goes... I'm in the process of building from scratch a web-based, .NET application that has the potential to become a high-volume site (several hundred thousand page views a month to start) and am strongly consideri...

Hiding column and row headings in SpreadsheetGear control

Is there a way to hide the A,B,C column headers and 1,2,3 row headers in the SpreadsheetGear 2010 control? We are using this as a display only control and showing these headings gives the impression that the data can be edited. Thanks. ...

Is my overview of .Net Data Providers and ADO.Net correct?

Recently I had to type up some documentation on .net data providers and ado.net. I am trying to get feedback on my findings. Please review and provide corrections or opinions. Summary This is a high level summary of the basic .Net API’s for interacting with a database. As a developer with mainly a Java and PHP background I was unclea...

Single sorted c# list with different types?

Hi Yes, I'm new to c#! :) i'm using .Net4 VS2010. I have Three classes each one is used to build a list of objects of that type. All three inherit form a base class. I want to combine the resulting three lists in to one and sort them on one of the base class elements. Can this be done with lists of different types? Simplified Ex...

Single click edit in WPF DataGrid

I want the user to be able to put the cell into editing mode and highlight the row the cell is contained in with a single click. By default, this is double click. How do I override or implement this? I've searched on google, and the codeplex answer doesn't work for me. I'm pretty new to WPF and coding in general, so a simple answer is b...

Best Practice for Try Catch Error Handling

I'm trying to avoid returning an incorrect value when in the catch but I'm having trouble finding a better solution than this: private SecurityLevel ApiGetSecurityLevel() { try { return _BioidInstance.GetSecurityLevel(); } catch { return SecurityLevel.High; ...

Convert Winform App to Console app

Is there a quick and dirty way (or a VS Macro) to convert a WinForms app to a Console App? I have a number of these apps that are no longer needed as Winforms apps. I suppose I could create a bunch of new projects and copy paste modules and classes over, but if it's just a matter of removing the single form that I have and editing/deleti...

Using SharpSVN how can you Export a file memory instead of to the filesystem?

So I know how to export files @ certain revisions to the filesystem (because all of the overloads for Export havie paths in them) but I do not want to have to use the filesystem for ease of access purposes. Is there a way to redirect this to a string or something? Thanks. ...

Is there a way to get Visual Studio to run "Transform All Templates" upon a successful build?

I have a T4 template that geneates helpert code based on other code that is declared within my project. Because of this, I have to build my project before I run "Transform All Templates". Is it possible to have "Transform All Templates" run as a post-build-event upon a successful build? ...

How to call function with address having stack object as argument with heap based data

Hello, I have a complex problem to be solve, as I am stuck and found no way at all to solve this. Here's a code struct MyStruct { int x; float y; char c; }; void foo(MyStruct a_myStruct); int _tmain(int argc, _TCHAR* argv[]) { void *pMyStruct = malloc(sizeof(MyStruct)); int* pInt = (int*)pMyStruct; *pI...

Return type of property in C# .net

If there is only a set part in a Property, then is there any need to declare a return type? For example: public string Email { set { email = value; } } In the above example is there any need of the word "string" after public? ...

protobuf-net and deriving from generic collections

I am having trouble figuring out how to get protobuf-net to serialize an object that derives from List< T >. I have tried adding the ProtoInclude attribute but I receive an ProtoBuf.ProtoException : Known-type List`1 for ProtoIncludeAttribute must be a direct subclass of UserTypeCollection. When I remove the ProtoInclude attrib it appear...

Difference between differnet web programming frameworks?

I have experience programming dynamic websites using both php and perl driven CGI code, (both on apache web server on *nix systems, though that shouldn't matter). I do not have too much exposure to other technologies for web creation, but I frequently hear hailing and railing towards them from all forms of developers. (The most I've he...

Looking for details on the PixelOffsetMode Enumeration in .Net, WinForms.

The possible values of PixelOffsetMode are: Invalid Default HighSpeed HighQuality None Half I'm guessing that HighQuality = Half, HighSpeed = None and Default = HighSpeed. If this is true then, like the SmoothingMode, I can offer just two simple options. Does anyone know if this is correct and, if so, where on earth did you find ...

routing webform in asp.net mvc

I have an ASP.NET MVC app and I have a WebForm page I built in the MVC due to a tutorial on how to do something I needed to do, but it was all in WebForm style. Ive tried to figure out how to do the same thing in MVC format but cant figure it out. So I was needing to figure out how to use this page in my MVC app. But when I try to go to ...

TemplatedParent - A clarification

Here's the Tree: MyControl : BOUND(IContentMenuItem) ControlTemplate ContentPresenter : BOUND(Header, HeaderTemplate, HeaderTemplateSelector) DataTemplate (For Header) Label I Want to bind The Label @ the end of that tree to a property on the DataContext of MyControl I can use FindAncestor to get the MyControl (Obviously) bu...

Can anyone tell me what the basic icons in Umbraco mean?

I've been asked to find out what several of the default icons in Umbraco mean, and if their meaning is somehow connected to being unable to move a node from one folder to another. Is there a handy, dandy list glossary somewhere of what all of these mean? The Umbraco forums talk incessantly about custom icons, but no one explains what the...

Atomically locking multiple files

What is the best way to atomically lock multiple files? One possibility I've thought of is a simple .lock file in the directory (I'm only protected from other instances of my program; I'm not necessarily trying to thwart other programs from disrespecting the lock.) However, everything I've learned about thread-safety screams "bad idea!" ...

Looking for API to SC.exe utility, and an advice on self-updating Windows Service.

We have built a Windows Service that is running on client's machines, which occasionally downloads a newer version of itself, and then performs a self-update: installs a new service, starts it, stops the old one, and eventually deletes it. The service cannot stop itself directly and do other stuff, so it spins another executable, which d...