.net

Can I develop production code with Microsoft Parallel Extensions to .NET Framework 3.5, June 2008 Community Technology Preview?

Is there any recommendation against using this CTP? Is it unstable? ...

Extend a TypeConverter

The DateTimeConverter class provides conversions between DateTime and string. I would also like to support conversions between DateTime and double. According to MSDN I can extend the DateTimeConverter class to do this - see MSDN DateTimeConverter I have created a class that inherits from DateTimeConverter and provides the appropriate o...

get computer name from within a windows service

Hi, In a .net windows service (C#), how can I get the computer name? Is this a reliable method, or should I wrap it in try/catch? ...

.NET marshalling speed

Hi all, I have a C++ method signature that looks like this: static extern void ImageProcessing( [MarshalAs(UnmanagedType.LPArray)]ushort[] inImage, [MarshalAs(UnmanagedType.LPArray)]ushort[] outImage, int inYSize, int inXSize); I've wrapped the function in timing methods, both internal and external. Inter...

Long-term potential of iPhone/Windows Mobile development platforms

It seems that Apple has so far gone the furthest of any mobile platform in creating a good all-around developer ecosystem (SDK, app distribution, monetization, etc). However, reading the comments from previous SO questions on mobile development (e.g. this and this), certain criticisms seem to pop up, such as the following: Objective-C,...

Can .Net custom controls be used in VB6 form?

I am doing some maintenance on a VB6 Windows application. I have a .Net custom control component that I would like to use on a VB6 form. Is this possible? I know how to access non-visual .Net components from VB6 by generating a COM type library for the .Net DLL, but can a .Net custom control be used like a .OCX from VB6? If so, how is th...

Logging in to an OpenID site from a .net app

I have been thinking of maybe writing a little tool that logs into SO and updates my profile info with some topical/current info on a regular basis (eg. my latest blog post or questions I need help on, etc...) To get this to work I will need to somehow log on to SO from a console app. Is there a .Net library that streamlines logging o...

Initialize library on Assembly load

I have a .net library dll that acts like a functional library. There are a bunch of static types along with static methods. There is some initialization code that I need to run to set up the library ready for use. When the assembly gets loaded is there a way to ensure that a particular method is run? Something like AppDomain.AssemblyLo...

How do I get the SqlDbType of a column in a table using ADO.NET?

I'm trying to determine at runtime what the SqlDbType of a sql server table column is. is there a class that can do that in System.Data.SqlClient or should I do the mapping myself? I can get a string representation back from SELECT DATA_TYPE, CHARACTER_MAXIMUM_LENGTH FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG = '{0}' AND T...

Is there a tool to select some code in Visual Studio and have it show the corresponding MSIL?

Lately I've found myself constantly running ILDASM to study the MSIL output of my programs. Are there any utilities to streamline this? Ideally, it would be nice to select some source code and have it compile, disassemble and emit the selected C# code in MSIL. Anyone know of such a thing? ...

Sourcecode Sharing/control on functional level?

Are there any source code sharing system that lets you check in/out code on function-level? Would be nice to be able to check out just one function or one subroutine or one property to work with and still let other developers work with the rest. I know that working with sorce-control-systems that working primary with mergeing is kind ...

Best solution for making an Autorun application?

For my work I need to create a Autorun application for a CD for our client. The problem is all I'm a C# programmer by trade and .NET does not make for the best autoruns since not all computers will have .NET installed on them. What is a good solution that will work on Win98-Vista computers? ...

How do you explain to a sales person that programming is really difficult and takes time.

I often work with sales and marketing types that cannot figure out how to use Excel, let alone understand the scope of their requests from a technical perspective. Of course, it would not be fair to expect them to, but that still leaves me with a problem. What is the best way to show marketing and sales types that they have asked for...

Identifiers or Variables which is which?

Hi, I'm quite confused about several books in .NET that I have read. Would someone out there like to explain to me what an identifier is and how it differs from a variable? Or variables and identifiers are the same? Thanks in advance. ...

Markdown in .NET

Is there a Third Party library available for .NET projects that can convert a markdown document into html server-side? I.e. I've stored Markdown text in a database that needs to be converted to html when it is displayed. I know about WMD, but it only converts client-side. ...

Using .Net classes through COM Objects in Delphi sometimes hangs

I have a set of libraries written in Delphi.NET (.NET 1.1) which I want to use in my Win32 (Delphi) application. For performance related issues, I've decided to follow the COM route. Sometimes, after rebuilding the DLL, when I try to instantiate the objects exposed through COM the win32 application hangs at the CreateComObject call--h...

Remove handlers on disposing object

I can think of a few messy ways to solve this, but it strikes me that there should be a far more elegant solution than those which I've already come up with. What's the most appropriate way for an object to cleanse itself of all of its event handlers prior to being disposed. It's a shame the event handler can't be enumerated upon. In ...

Robust WCF service

What is the best way to ensure service robustness to prevent a service becoming unavailable, if it does become unavaliable is there a way of restarting the service? thanks in advance. ...

Will a .NET Webservice break when I add a Property to a Parameter?

I have a .NET Webservice which hosts a Method called AddMyObject. [WebMethod] public void AddMyObject(MyObject[] objects){...} Where MyObject is declared as public class MyObject { public string Pro1{get;set;} public string Pro2{get;set;} } If I now add a Property to MyObject, the Client creates a new Proxy from the new WSD...

Linq to Sql and the Repository Pattern.

I feel like I'm running around in circles. I can't seem to make up my mind as to what the right Repository pattern is using Linq To Sql. If you're familiar with Rob Conery's MVC Storefront you will see that his implementation wraps the Linq-Generated models with another class and treats the Linq-Generated one simply as a Data Transfer Ob...