.net

What's the best available online resource for Windows Mobile Development?

What's the best available online resource. ...

How can I clone a .NET solution?

Starting new .NET projects always involves a bit of work. You have to create the solution, add projects for different tiers (Domain, DAL, Web, Test), set up references, solution structure, copy javascript files, css templates and master pages etc etc. What I'd like is an easy way of cloning any given solution. If you use copy/paste, t...

.NET design course?

Is there a course that can help non OO programmers how to develop in .NET in a good way? I don't mean just the syntax and how to design a class and the relationship between class but how organize a solution into projects (naming, what to put on each one) what method is more suitable to access data (dataobjects, remoting, ORM) how to desi...

Is there a difference between DataTable.Clear and DataTable.Rows.Clear?

I recall there is a difference between some methods/properties called directly on the DataTable class, and the identically named methods/properties on the DataTable.Rows property. (Might have been the RowCount/Count property for which I read this.) The difference is one of them disregards DataRow.RowState, and the other respects/uses it....

.Net Localization problem

I am currently building an Excel 2007 Add-in using VSTO (latest version + sp1) and .Net 3.5 The code simply takes the position a chart using the Top and Left properties and stores it in an XML file. The problem im facing is that when the xml is generated using a Vista Ultimate + Excel 2007 + English environment the code works perfectly...

Parameterized Sql queries

This is a nut I'm cracking these days Application I'm working on has some advanced processing towards SQL. One of the operations selects various metadata on the objects in the current context from different tables, based on the item names in the collection. For this, a range of "select...from...where...in()" is executed, and to prevent ...

Writing a generic class to handle built-in types

Not too practical maybe, but still interesting. Having some abstract question on matrix multiplication I have quickly implemented a matrix for ints, then tested my assumptions. And here I noticed that just int matrix is not good, if I occasionally want to use it with decimal or double. Of course, I could try just to cast all to double,...

Can you control whether a variable's type is dynamic or static in VB9?

I would like to use VB9 but am not sure what syntax to use to say that I want a variable to be statically typed as in C#'s: var foo = new Whatever(); In previous versions of VB: Dim foo = New Whatever() created a dynamically typed variable. Is there a way to get static typing without actually writing the type in VB9? ...

How do you handle multiple selection in a drop down style control?

I have a WinForms application with a view where the user selects a single time span from a list of predefined time spans in a ComboBox, with it's DropDownStyle property set to DropDownList. Now, the requirements have changed. The users are going to need the ability to make multiple selections from the list of time spans. Is it possible...

additional fields in NHibernate many-to-many relation tables

when i have a many-to.many relation with nhibernate and let nhibernate generate my db schema, it adds an aditional table that contains the primary keys of the related entities. is it possible to add additional fields to this and access them without having to hassle around with sql manually? ...

Performance of System.IO.ReadAllxxx / WriteAllxxx methods

Is there any performance comparison of System.IO.File.ReadAllxxx / WriteAllxxx methods vs StreamReader / StremWriter classes available on web. What you think is the best way(from a performance perspective) to read/write text files in .net 3.0? When I checked the MSDN page of System.IO.File class, in the sample code MS is using StreamRea...

Does NetworkStream.DataAvailable see buffered data?

Does NetworkStream.DataAvialable know whether the sender's send buffer is empty? Or does it simply indicate whether the receiver's read buffer has data? My assumption is the latter... Specifically, for some socket work involving an ongoing conversation, I currently use a length-prefix so the the receiver knows exactly how much data is i...

Unable to serialize a property on a control

Background I am trying to create a copy of a business object I have created in VB.NET. I have implemented the ICloneable interface and in the Clone function, I create a copy of the object by serializing it with a BinaryFormatter and then de-serializing straight back out into another object which I return from the function. The class I...

Best Linux distribution for running Mono

I'm a .Net developer and would like to investigate building and running our framework on Mono. If the initial project is successful I will happily invest in an OS learning curve, but right now I want to focus on getting things up and running and seeing the code working. What would be the best distribution to start with, assuming that...

How to wait on another process's status in .NET?

I'm working on an integration testing project in .NET. The testing framework executable starts a service and then needs to wait for the service to complete an operation. What is the best approach for the exe to wait on the service to complete its task (the service itself will not exit upon task completion)? Both processes have access t...

C# preg_replace?

Hi, What is the PHP preg_replace in C#? I have an array of string that I would like to replace by an other array of string. Here is an example in PHP. How can I do something like that in C# without using .Replace("old","new"). $patterns[0] = '/=C0/'; $patterns[1] = '/=E9/'; $patterns[2] = '/=C9/'; $replacements[0] = 'à'; $replacemen...

WinDbg outputs characters to console nonstop

Hi all! I'm developing a POS application that is used in about 200 locations as of right now using .Net 2.0, WCF and SyncFusion components for the GUI. Two days ago we installed the application in a new location, and it has been suffering sudden termination of the application. The application has a running log of events and exceptio...

Release COM Components

Is it really necessary to release COM components from Office PIA, when you don't need them anymore by invoking Marshal.ReleaseComObject(..)? I found various and contradictory advices on this topic on the web. In my opinion, since Outlook PIA is always returning a new references to its interfaces as returning values from its methods, it ...

Detecting Graphic Options in .NET

What is the the best of detecting and later altering the screen resolution and multiple desktop within .net I have a small app that while runs at work on my multiple monitor/high(ish) resolution however what I want to be able to detect is the users primary monitor and set the application to that (main objective) and adjust the resolutio...

What is the proper naming convention for a web service in .NET?

I'm creating a webservice, and I want to name it appropriately. Right now my service is named Service as per the /App_Code/Service.cs Should I rename it to something like: com.example.MyWebService.cs? How do I get around the class file not excepting '.' in the file name? ...