Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > c# > april 2008 > threads for wednesday april 9

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

destroyng object
Posted by josh at 4/9/2008 11:47:33 PM
Hi, I have an important doubt! If in my class I implement a Dispose() method and then call it from my application is it useful only for free unmanaged resources? the object itself is then discarded from heap memory by the GC when it wants? my doubt is, for example, if MyObj has a destr...more >>


Singleton and GC
Posted by David at 4/9/2008 9:18:01 PM
Consider the following singleton: public sealed class Foo { private static readonly Foo instance = new Foo(); private Foo() { //Do init work } public static Foo Instance { get { return instance; } } } Once the Instance prop...more >>

LINQ doesn't exist?
Posted by Andy B at 4/9/2008 7:49:11 PM
I had an asp.net web application that was converted from .net 2.0 to .net 3.5. When I added a web content form to the project, added some html content and then went to preview it from visual studio 2008 solution explorer I got the following error: Error 1 The type or namespace name 'Linq' does...more >>

Visual Studio 2008 and code snipIts
Posted by Andy B at 4/9/2008 6:25:02 PM
How do you add code to the code snippit library in visual studio 2008? I was never able to figure it out. ...more >>

Type.GetType
Posted by Jon Slaughter at 4/9/2008 6:18:13 PM
Type asdf = Type.GetType(t.GetType().FullName); How come something like that returns a null type when t is a generic type? It works fine for non-generic types. ...more >>

How do I call C++ functions from a C# coded Service?
Posted by Chip Gore at 4/9/2008 5:43:59 PM
Hi - Using Visual Studio 2005, I have created a stand alone command line .exe program that "does what I want". All of the functionality that I would like to make available to my C#/.NET service is in a few .cpp/.h files (that my .exe main line .cpp file calls and uses fine). I'm not sure...more >>

WPF web application that run on a web server
Posted by Andy B at 4/9/2008 4:08:42 PM
Is there any way to make WPF web applications that run on a web server? I'm thinking that the WPF application would run on the web server like an asp.net web application would. Any ideas? I use VS2008 Team Suite. ...more >>

Adding .cpp files (C++ code) into C# 2.0 application
Posted by eljainc at 4/9/2008 4:04:16 PM
Hello, I have 3 or 4 source code files that were written in VC++ (an earlier version, like VC++ 6.0). I need to be able to use the code in my C# .NET 2.0 forms program. I have tried to add existing items (the .CPP files) to a new VC# project. How do I go about accessing the methods and varia...more >>



network read question
Posted by parez at 4/9/2008 3:03:38 PM
Hi, When does the socket (server) know when to stop reading. e.g. if i have a buffer = 25K and do networkStream.write twice.. what will the server read? 25k or 50K? And should i send a message length for every message i send? and make the server read specified number of bytes? ...more >>

Globally capturing keyboard events for a WinForm application?
Posted by Bill Fuller at 4/9/2008 2:47:10 PM
I've done this before, but no longer have the code and can't remember how. Does anyone have an example on how to globally monitor keyboard events for an application and modify them to treat, for example, an "ENTER" event as a "Tab" event... or something similar. ...more >>

Configuring a library
Posted by Jona Gold at 4/9/2008 2:09:28 PM
I have an argument with a senior programmer here. He says I shouldn't have special configuration for the part of the code that's in the library. But isn't that the whole point of libraries: that you can separate concerns, that you can change the library, without needing to recompile all the app...more >>

preventing users from submitting inputs twice
Posted by Ned White at 4/9/2008 2:06:30 PM
Hi All, Im my c# web project, users click a submit button for credit card payment process. On the web server side ( on ButtonClick_Event) the user's input(name,date,cc number etc.) is processed and some transactional database processes are taken based on the inputs. My problem is, users...more >>

Linq to csharp equivalent
Posted by d-42 at 4/9/2008 12:27:15 PM
Hi, I'm trying to under stand linq syntax, and how it relates to 'plain csharp': For example, this trivial example grabs the accounts with a name greater than or equal to "S"... List<Account> Accounts; List<Account> mylist = from acc in Accounts where acc.Name >= "S" select acc.ToList(...more >>

Validating aspx.cs files
Posted by Deidre L. Sellers at 4/9/2008 12:22:28 PM
Good Afternoon: I am seeking assistance with aspx.cs files. In order to accommodate persons with disabilities, the project website/pages must be 508 Compliant. Ongoing research on how to test aspx.cs files for 508 Compliance has been exhausting with no concrete results. 508 Compliancy is t...more >>

OT: Crystal report
Posted by Martin Arvidsson, Visual Systems AB at 4/9/2008 12:19:13 PM
Hi! Sorry for the offtopic.... I am using VS 2008 as development environment. When i create reports etc it ads version 10.5 as reference files of the crystal engine. I have crystal XI (11) installed. How can i tell the Studio to use these newer files instead and also generate correc...more >>

System.Collections.Generic.List<int> myList = new System.Collections.Generic.List<int>(100);
Posted by DR at 4/9/2008 12:05:36 PM
System.Collections.Generic.List<int> myList = new System.Collections.Generic.List<int>(100); Does this preallocate 100 integers? Also, is there any way to preallocate an array of objects all at once? MyOb[] al= new MyOb[100]; for (int z = 0; z < nCount; z++) { al[z] = new MyO...more >>

Sending mail encounters AuthenticationException (remote certificate is invalid ...)
Posted by Afshar at 4/9/2008 11:57:57 AM
Hi there I'm sending email via a server that uses SSL. The server has Certification problems. Whenever I send email I got following exception: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. How can I tell .NE...more >>

LINQ Classes in Separate Files
Posted by Marc S at 4/9/2008 11:46:43 AM
Instead of having everything in a single file that represents my database I have a file for each table and a relationships.cs file for defining my relationships. I then created a ClassExtenstions.cs file with partial classes which provide custom functionality such as getting the text descriptio...more >>

Gridview dynamic columns
Posted by jimmysjams at 4/9/2008 11:41:01 AM
I'm modifying someone else's code and I have hit a snag. I don't want to rewrite what's already there but I might have to. I have a gridview, in the gridview is a set number of columns that will always be there. On the end of the gridview I need to add columns dynamically. These columns ma...more >>

checkbox visible based on multiple rows
Posted by duncfair at 4/9/2008 11:03:17 AM
asp.net 2.0 and language is c# I need to add a single checkbox on an aspx page based on evaluating two aspects of the items the customer has placed in the shopping cart. The price must be $100 or more and the brand must be a specific brand. There may be multiple items in the cart but there c...more >>

datagrid alternative?
Posted by duncfair at 4/9/2008 10:11:27 AM
I need to create code to deploy Google Analytics e-commerce. The item data needs to be formatted like so: pageTracker._addItem( "3333", // OrderID "929392939392 ", // SKU "Widget ", // ProductName "Fuschia ",...more >>

Select another page on TabControl
Posted by Vanessa at 4/9/2008 10:11:03 AM
Hi all! I have 4 pages in a TabControl. Depending on a selection on the first page, I enable the second page and disable the third one, and vice-versa. What I want is that when the user try to select the disabled page I select the following one. For example, if the second page is disabled,...more >>

References to other projects
Posted by Peter Morris at 4/9/2008 9:54:00 AM
I have a product which has a solution made up of about 6 projects. I am now writing a website for this project and one of the requirements is to use a project from the first solution in order to use the class that creates user license files. This license project uses other projects too. I...more >>

Refection problems
Posted by csharpula csharp at 4/9/2008 9:22:27 AM
Hello , I would like to ask about the following issue: I am activating this code after i created the InitializationAttribute and added it above objects: PropertyInfo[] properties = this.GetType().GetProperties(); foreach (PropertyInfo property in properties) { object[] attributes = ...more >>

class name
Posted by Andrew at 4/9/2008 9:21:01 AM
Hi, I have a class named "clsTest" Is it possible to capture the value of clsTest in a variable, and then use it to instantiate the object A ? if (ClassName = "clsTest1") then ClassName A = new ClassName; else if (ClassName = "clsTest2 ") ClassName A = new ClassName; //normally...more >>

Exception Type
Posted by csharpula csharp at 4/9/2008 8:24:34 AM
Hello , I am defining a new attribute for validation purposes ,in case the validation of the object which has specific attribute not passing well which kind of exception should I throw? (kind of Ilegal state,is there an already defined format for it?) Thank you! *** Sent via Developersd...more >>

Dynamic variables
Posted by Fabio at 4/9/2008 8:20:11 AM
Hi I am very new to C#.NET 2.0 I was wondering if someone can help please. I have a screen with a datalist control. The data in the list can contain x amount of rows (usually a low number). When I click a button on the screen I want to build a dynamic 2 dymentional array or dataset (not ...more >>

Copy file to remote PC
Posted by alexia.bee@gmail.com at 4/9/2008 7:58:25 AM
Hi all, I need to copy a file from my PC to a remote PC. The remote PC has different password and user name. both PCs are on same domain not WORKGROUP. Is there a .NET class or windows API which I can use to copy file? does File.Copy supports that? I so, how should be the destination file st...more >>

"The object invoked has disconnected from its clients"
Posted by raulavi at 4/9/2008 7:47:03 AM
VS2005 gets this error "The object invoked has disconnected from its clients" does anyone know about a fix for it?...more >>

LINQ and ToList when querying multiple sources
Posted by Marc S at 4/9/2008 7:42:18 AM
var qry = from s in dbCxt.Services from j in s.Jobs where s.ID == 200 select new { s, j }; I want to call qry.ToList() but with the list containing anonomyous types I don't know how to create a List object to support that. I want to get all records in a Lis...more >>

How to consume different web services on dev and live environments?
Posted by Danny Ni at 4/9/2008 7:01:10 AM
Hi, I am working on a project that consumes web service, on my dev machine I added a web reference to http://dev.mydomain.com/webservice1.asmx. But when the codes deployed to live, I need to consume http://live.mydomain.com/webservice1.asmx instead. Other than manually changing the web r...more >>

Data Entry Jobs FOR FREE
Posted by andhralo3 at 4/9/2008 5:00:08 AM
Data Entry Jobs FOR FREE http://earnmoneydaily300dollars.blogspot.com/...more >>

Whats LinkedListNode<>?
Posted by Jon Slaughter at 4/9/2008 3:58:15 AM
When I create a LinkedList<> what is a LinkedListNode compared to a value? AddFirst(54) for example, does it turn 54 into a node or what? I'm trying ot find out what the LinkedListNode is specifically for? Basically just a wrapper around the reference type? ...more >>

The state of an object controlled by the object itself or some other source?
Posted by Andy B at 4/9/2008 3:42:47 AM
I have an object (Contract). After it has been signed (it's a legal document), it can't be changed. It is read only, frozen or locked depending on what word you want to use after the customer signs it. Should this state be controlled by the Contract itself or some other source? And the other ...more >>

WCF service: how to always execute in same thread
Posted by ludwig_stuyck@hotmail.com at 4/9/2008 12:20:22 AM
Hi all, I'm service enabling a single-threaded COM component, which has the requirement thet everything is executed in the same thread. How can I make sure that if a WCF service method is called, it is executed in always the same thread? Thanks!!...more >>


DevelopmentNow Blog