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# > february 2008 > threads for saturday february 23

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

Longest line of C#; isolated storage
Posted by Peter Webb at 2/23/2008 11:30:50 PM
If Nicholas Paldino reads this, please don't have an apoplectic fit. Other professionals with weak stomachs may want to look away. My problem was that I needed to set up some files that the user can read, write and delete. There are 20 of these, all xml, about 30k each. I couldn't work ou...more >>


LINQ to SQL: What is the equivalent of timedate in C#
Posted by K Viltersten at 2/23/2008 11:04:11 PM
One of the columns i'm mapping my class to has the variable type "datetime" and i wonder what that could be mapped to in C#. The only thing i've found was TimeInterval and that's hardly correct, is it? private ?!?!?! _time; [Column (Name = "time")] public ?!?!?! time {get{...} set{.....more >>

Disable toolstripmenuitem
Posted by Andrus at 2/23/2008 11:00:20 PM
I placed Combobox to winforms DataGridView using DataGridViewComboBoxColumn and other controls. My combobox class contains code to enable/disable button in form. OnEnter and OnLeave events fire but button is never grayed out. How to make button active only if combobox column is active ? ...more >>

LINQ to SQL question - using Stored Procedures with multiple result sets
Posted by Kevin S. Goff at 2/23/2008 10:27:45 PM
Suppose I have a stored procedure called GetAgingData - and the stored procedure returns 4 result sets. I want to use IMultipleResults to do the following: MultipleResults result = db.GetAgingData(ParametersForStoredProc); IEnumerable <GetAgingDataResult1> oHeader = resu...more >>

Understanding IoC and Dependency Injection.
Posted by Frank Rizzo at 2/23/2008 10:27:27 PM
I am trying to understand IoC and Dependency Injection. Some places claim they are the same thing, others claim that they are different. I've looked at code samples for both. It seems like the technique is not much more than loading an object, defined by an interface, on the fly from an ou...more >>

Migrating application from 1.1 to 2.0
Posted by Maqsood Ahmed at 2/23/2008 9:36:02 PM
Hello, We have started our migrating our application which is currently running on .NET Framework 1.1 SP1 to .NET Framework 2.0 SP1. We didn't have Visual Styles enabled in our application due to some issues present in 1.1 SP1. Now we are planning to enable visual styles but we are facing two i...more >>

[Form Authentication] - Modify ReturnUrl value
Posted by tranky at 2/23/2008 8:49:40 PM
Hi, i've a problem, and i know you can help me to solve it. I'm using Asp Net and Form Authentication. When i'm anonymous and i must show a protected page, i'm redirected into a login.aspx page and in the path of the page (in the address bar) is added "ReturnUrl=...ecc...eccc...". It's the pa...more >>

Appdomains and named events
Posted by Dilip at 2/23/2008 8:35:58 PM
I have a peculiar problem that I am not sure how to solve. I have a C# application that has 2 appdomains. The default appdomain just exposes a remoting end point that external applications can call into if they want to re-start code executing in the other appdomain. The main thread of the oth...more >>



Can I determine the control that called a sub?
Posted by Academia at 2/23/2008 7:52:15 PM
Within a sub can I determine the control that called it. I can add a parameter to the sub so that I call it: MySub(This, ... But I'd rather not. Is there some way to determine the caller within the sub? Thanks in advance ...more >>

drawing graph in c# help
Posted by DBC User at 2/23/2008 7:16:22 PM
Hi all, I would like to see if it is possible to draw unrooted and rooted tree in c#, I checked the zedgraph and it is only like line, bar or chart not a free form graphs. Is it possible to do it? Thanks,...more >>

Linq to XML
Posted by shapper at 2/23/2008 5:33:22 PM
Hello, I am using LINQ to select records from a SQL database. How can I create a XML file from it? Thanks, Miguel...more >>

getting UserId of newly created user by CreateUserWizard
Posted by Adam Right at 2/23/2008 5:04:51 PM
Hi All, I can find UserId of an Authenticated user over the ProviderUserKey of MembershipUser , like that: if(Page.User.Identity.IsAuthenticated) { MembershipUser usr = Membership.GetUser(Page.User.Identity.Name); Label1.text = usr.ProviderUserKey.ToString(); } But, is it possible to...more >>

Linq Query
Posted by shapper at 2/23/2008 4:49:07 PM
Hello, I have two tables, Tags and ArticlesTags, with the following columns: Tags > TagID, Text ArticlesTags > TagID, ArticleID I need to create a LINQ query to select all records in Tags which are also in ArticlesTags. I have the following: Dim database As New CodeDataContext ...more >>

Some design issues about Inheritance
Posted by Tony Johansson at 2/23/2008 4:45:22 PM
Hello! Assune I have differentf FreightCars for example Tanker and Boxcar and maybe some other shape of Freightcar. FreightCars is a kind of vehicle pulled by a train. If I would calculate for example the volume for these two I would first create an abstract class called Freightcar and ...more >>

Convert variable column name query to DLinq
Posted by Andrus at 2/23/2008 3:29:54 PM
I use method below to populate multicolumn picklist from database. Columns names are passed to this method as strings. How to convert this code to Linq-SQL ? Andrus. BindingList<PickListEntity> GetPickList( string displayMember, string dm2, string valueMember, char discriminator) { ...more >>

Detecting Windows and .NET version
Posted by Arek at 2/23/2008 3:18:51 PM
Hi, How to detect Windows version and .NET version? I mean I want to know if user is using Windows 2000, XP, Vista and which Service Pack and version (XP Home, XP Pro, Vista Home Basic, Vista Premium, etc.). Is there any easy way to retrive this information? I'm wondering if all modern Win...more >>

Convert DataTable to Xml string variable...
Posted by Matthew Wells at 2/23/2008 2:18:51 PM
Hello, I'm trying to find a way to convert a datatable to xml and assign that to a string variable without saving to a file. Obviously I don't want to slow down the process by writing to disk, but all the methods I've found so far (datatable.writexml) write to a file. I think there's ...more >>

Sorting arrow in listview header
Posted by John Rogers at 2/23/2008 1:45:57 PM
Does anyone have a snippet that shows how to put the sorting arrow in the listview header? Something simple and not any of the sorting code for sorting the data. Thanks John- ...more >>

How to turn off automatic namepsaing in Visual Studio
Posted by Richard Coltrane at 2/23/2008 1:32:58 PM
Hi there, Does anyone know how to turn off automatic namespacing in Visual Studio for C#? Everytime i create a class it gets named according to what folder its in and i really really hate that it does that. Thanks RC ...more >>

MDI parent form background refresh issues
Posted by Andrus at 2/23/2008 12:09:29 PM
I put picture and changed background color in MDI parent form. There are refresh issues when child forms are created, moved, maximized and restored: Parts of background picture are incorrect. Background contains parts of maximized child window. I tested this in 2 different video cards in X...more >>

Webapplication on its own
Posted by Jelle de Jong at 2/23/2008 11:39:23 AM
Hi all, I earlier post about wanting to create my own database for webpurposes. But you've recommended me not to do this! ;-) But maybe you can help me on this. I want to create a Webapplication framework, and it need to run on a default IIS, with .NET Framework running. And no database ...more >>

Newbie: Main instantiating the class it's contained within ???
Posted by hdjim69 at 2/23/2008 10:16:28 AM
Hello, every book an article I read on csharp, the Main method instantiates the actual class it's contained within. Seems weird to me. Kinda having a hard time with this. Why do this ? Why not have Main in it's own class like MainStarter or something and then instantiate all the other classe...more >>

Using HttpWebRequest for a Multipart POST
Posted by JB at 2/23/2008 8:22:36 AM
Hello, I am writing a method that performs a HTTP POST and sends two text parameters and the third is an image that will be uploaded as part of the HTTP POST. I can get the function to properly post the text parameters, but the image shows up as an "X" like it is missing. It's not missing...more >>

eof
Posted by Juan Marcial at 2/23/2008 7:47:01 AM
does how to know end of file (eof) while reading a binary stream that does not support seeking? that is, is not valid: while (br.PeekChar() > 0) { ... } -- Juan Marcial Ingeniero de Software...more >>

Confused with properties declaration
Posted by Bogdan at 2/23/2008 7:35:13 AM
Hi, I mainly develop in C++ and Java but I think I have a basic understanding of C# which I use occasionally only. I came across the following declaration of properties in on line docs: DbParameterCollection.Item(Int32) DbParameterCollection.Item(String) Since this is not a 'typical' ...more >>

Dynamic linking
Posted by Jon Harrop at 2/23/2008 7:09:04 AM
I am writing a library (a DLL) and would like it to load the DLLs that it depends upon only as they are needed. For example, I would like to give the user a choice between MDX, WPF and XNA without having to load all three. How can this be achieved? -- Dr Jon D Harrop, Flying Frog Consult...more >>

nativeMethod error
Posted by GS at 2/23/2008 2:23:32 AM
I was attempting to use the Guid("B722BCCB-4E68-101B-A2BC-00AA00404770") for IOleCommandTarget and Guid("D30C1661-CDAF-11d0-8A3E-00C04FC9E26E") for interface IwebBrowser2 However I got errro Error 1 'System.Drawing.NativeMethods' is inaccessible due to its protection level c:\webCtlExtende...more >>

efficient server in c#
Posted by Rob at 2/23/2008 12:25:20 AM
Hi, I would like to write game server in c#. It's rather easy and slow game, not quake5 ;) But I don't want to create a new threat for each connection, because I would like to write good server. (I afraid do huge number of threads..) Which class for connection should I use ? (for server and...more >>


DevelopmentNow Blog