.net-2.0

SerialPort events won't fire on Windows Server 2008 using .NET 2.0 Application

I have a program that reads data from a scanner via the serial port. This program works fine on Windows XP. We have a terminal server set up running Windows Server 2008. I run HyperTerminal on our test terminal, it connects and reads the scanner data fine through COM1. I run my app on that same test terminal and get nothing when I sc...

Comparing two generic lists on a specific property

I'm using VB.NET with .NET 2.0. I have two lists, and I want to compare the lists on a specific property in the object, not the object as a whole, and create a new list that contains objects that are in one list, but not the other. myList1.Add(New Customer(1,"John","Doe") myList1.Add(New Customer(2,"Jane","Doe") myList2.Add(New Cust...

Basic threadpool question

Let me preface this with the disclaimer that I am very new to multithreading and may be missing something obvious. I'm currently using the below code to process all the files in a directory. My question is if it would ever be possible for a thread to finish, decrement numFilesLeft, and find it equal to 0 because the next item hasn't bee...

How do you superimpose text, a still image, or windows.drawing graphics over a video stream?

I am using a third-party .NET video capture function library that displays atreaming video from a USB video capture device in a VideoPictureBox (which is very much like the usual .NET PictureBox). I want to display graphics and text over the video stream. Is there some way to superimpose a regular PictureBox such that the graphics and t...

c# version number that comes with .net 2.0?

what is the c# version number that comes with .net 2.0? Any suggestion... ...

DAL and BLL naming conventions other peoples alternatives

Silly question really but just was wondering about other peoples naming conventions for DAL and BLL if there were any better names for them than those ones. ...

ASP.NET 2.0 Compilation Error BC30002: Type is not defined.

First of all, let me explain the situation, I know this is a bit complicated. And I apologize for my poor English. I have created a dll library which contains the classes I created. I tested the library with Console Application and web site created with Visual Studio 2005, everything works fine. So I copied the dll to the "Bin" folder ...

ASP.NET Countries List and DropDownlist change language code

I want to have a link that is like this change(en-NZ) which shows the language Im using and that page will take me to another page that has a dropdownlist of countries and their language codes from there I can select from the dropdownlist which has already selected my current language and change it for all my pages, is there any sample c...

Dictionary<string, string> Object and sorting in asp.net 2.0 or alternative

How do you sort a dictionary object in C# 2.0 for asp.net or is their an alternative to Dictionay for sorting this is to sort a countries list alphabetically ...

Change Language dropdownlist country codes etc

I have a dropdownlist with the country codes and country names sorted alphabetically now how do change each page to that language by the selected item in the dropdownlist im using the RegionInfo TwoLetterISORegionName object in the dropdownlist corresponding to that country is that the correct way to do it ...

ASP.NET CultureInfo change it on one page make it global

How do I change the language CultureInfo from a dropdownlist and from there make it global. I have set up a Countries List in a dropdownlist with the regioninfo TwoLetterISORegionName what do i need to do to too make it global from the selected item in the dropdownlist ...

Page won't change language

My page won't change the language could someone have a look at my code and tell me what im doing wrong it always goes to the default language public partial class ChangeLanguage : BasePage { protected void Page_Load(object sender, EventArgs e) { SortedDictionary<string, string> objDic = new SortedDictionary<string, strin...

CultureInfo question

is this snippet at the bottom add the language code to the dictionary object foreach (CultureInfo ObjectCultureInfo in CultureInfo.GetCultures(CultureTypes.SpecificCultures)) { RegionInfo objRegionInfo = new RegionInfo(ObjectCultureInfo.Name); if (!objDic.ContainsKey(objRegionInfo.EnglishName)) { ...

Are arrays really fixed length in ASP.NET 2.0?

If I dim an array to say, 5 elements, should it not fail if I go to add a 6th? I thought this used to require a redim. In .NET 2.0, I have a character array of length = 3. When I populate it from the db, one record had 4 characters in it and it successfully added all 4 characters to the array? ...

DayRender Calendar want to change Link Button To HyperLink

Just want to know how do you iterate through the calendar days on the DayRender event and change them to links from link buttons ...

Catching mouse events for a custom SplitContainerDesigner

I'm trying to create a user control that will provide a draggable splitter between two panels — exactly like SplitContainer — in a custom IDesignerHost implementation. SplitContainer itself, as far as I can tell, is not an option; it will raise an exception unless used in Visual Studio's Designer. My implementation would look roughly li...

When linking a .NET 2.0 Managed Assembly from a .NET 4.0 Application, which framework is used?

If I have a 2.0 CLR assembly (pure managed code, no mixed mode issues) that I need to link to from a 4.0 CLR Application, does the 2.0 code run on the 2.0 CLR or 4.0. Basically, is there any risk of 4.0 breaking changes affecting the 2.0 code? ...

How do you get a month name from an integers value

e.g. example 7 is July ...

Quick check of all sub items in a List

I have a list with a boolean value as one of the properties. I need to check if every one of these is true. Now normally LINQ would give a nice clean answer here, but as I am using .NET 2.0 I can't use that. If there a nicer way to do this or am I going to have to do a for each loop and break out on finding a false? Edit: Seems I cou...

ToolStripDropDown AutoClose not working correctly in all scenarios

I have the following setup: 1- A ToolStripDropDownButton with a ToolStripDropDown that contains a CustomUserControl that contains a ListView. 2- The ListView has a ContextMenuStrip associated to it. As a solution for this question, my code works like so: (psuedocode) if ListView RightClicked ToolStripDropDown.AutoClose = f...