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 2

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

end of stream vs !DataAvailable
Posted by Ryan Liu at 4/2/2008 11:40:57 PM
Hi, For NetworkStream, what is difference between ReadByte() return -1 indicates "end of stream" and DataAvailable = false? Thanks a lot! ...more >>


How to discover the class libraries
Posted by Steve Thackery at 4/2/2008 11:36:35 PM
I'm a newbie to C# and .Net, but have been a part-time programmer in Delphi for some years. My challenge isn't so much learning the C# language, as the seemingly vast ..Net class libraries (which are apparently split into the Base Class Libraries and the Framework Class Libraries). It se...more >>

fixed point arithmatic in micro framework
Posted by m.a at 4/2/2008 11:25:47 PM
Hello, Is there any fixed point library in .net framework? I need it to use on fixed point processor that doesn't have any floating point co processor Regards ...more >>

Left, Right, Mid?
Posted by at 4/2/2008 11:04:37 PM
What are the equivalant to left, right, etc. in C#. How can I extract strings from a string without them? For instance, I have a string like so: "c:\thedir\subfolder\maybeanother\__TFMF_lrniez55ufziugv2nnznzeyt_b9c9c1d5-230a-43e1-b38a-7a44_0___Selected.eps" I need to return just the direct...more >>

OT: NUnit Test Fixture Location
Posted by Robert Cramer at 4/2/2008 10:35:49 PM
I'm learning NUnit and do not like the idea of keeping the test fixtures in the same assembly as the classes being tested. But all of the examples I have been able to find show either (1) the test fixture in the same assembly and namespace as the test subjects, or (2) are moot on the location ...more >>

Dynamically change size of Array type and IEnumerable
Posted by Jon Slaughter at 4/2/2008 10:05:25 PM
Is it possible to dynamically change the number of elements of one of those types without actually knowing the element type? Say I have a int[] l = new int[30]; But later on in my code I have an object that I know is an array or because I have if (s is Array) { } But I do not ...more >>

Whats better for holding multiple items? Collection class or array
Posted by Andy B at 4/2/2008 8:47:51 PM
For holding multiple objects, what is the better way to hold them? a collection class or an array? ...more >>

Serialize
Posted by }{ at 4/2/2008 5:52:29 PM
I have implemented a class that contains two Serial port objects among other things. When I try to serialize this class I get an error relating to the fact that Serial Port class isn't marked as serializable. Is it possible to accomplish this. Any help is greatly appreciated. ...more >>



GIS Plugin for VS C# 2005
Posted by Randy at 4/2/2008 4:21:53 PM
Does anyone know of a good GIS plugin for VS 2005? Thanks ...more >>

Looking for a SqlBulkCopy that can do UPDATE...
Posted by TheSteph at 4/2/2008 3:52:24 PM
Using : MS-SQL 2005 / .NET 2.0 / VS2005 I have two server with the same database def but different data. I would like to import data from Server2.TableA to Server1.TableA. If a row doesn't exists on Server1.TableA, it should be added; if the data already exists it should be updated. I h...more >>

Linq object original value
Posted by Darren at 4/2/2008 3:31:07 PM
I need to be able to track the original value of the object. The datacontext doesn't seem to provide any way to do this, you can get the modified objects but not the original state. I don't see any way to specify an additional interface for each table using the designer :( If I could it would...more >>

publish win forms application .net 3.0 vs2008
Posted by parez at 4/2/2008 1:41:22 PM
Hi, I am developing a .net 3.0 win forms(C#) application using vs2008. I am also using 3rd party controls which are installed in the the GAC. After i publish the application on the different computer, the installer says that i need the 3rd party control installed in the GAC. Is there any way ...more >>

getsockname
Posted by David at 4/2/2008 1:33:01 PM
Is there a C# equivalent to getsockname? Or, what is the C# way of getting the port a socket is bound to if you allow windows to pick the port for you? -- Best Regards "Failure is the opportunity to begin again more intelligently" – Henry Ford...more >>

how to determine hosted server url from within wcf service?
Posted by paul korosi at 4/2/2008 1:22:56 PM
Hi, I've got a wcf service that is hosted on my local machine. I need to determine the hosted url of the service from within the service but cannot work out how to do it. HttpContext.Current always returns null, which i suppose might make some sense. Does anyone know of a way to get the url? ...more >>

basic question about NetworkStream( read/write, multiple thread)
Posted by Ryan Liu at 4/2/2008 12:53:55 PM
Hi, I have some basic question about NetworkStream, can someone explain to me? Thanks a lot in advance! TcpClient has a GetStream() method return a NetworkStream for read and write. I remember there are 2 streams in Java, one for read, one for write. If I just use synchronous Read() and...more >>

DataGridView, BindingList : Add and Remove
Posted by Claude at 4/2/2008 12:52:01 PM
It is possible to capture the "AddingNew" event to create our own object before it is append to the BindingList (using e.NewObject = new ...) When the user press delete on a row to remove a row from the DataGridView, I need to do some stuff before it actualy modify the content of the Bindin...more >>

ContextMenu Opening Event and Mouse Location
Posted by O.B. at 4/2/2008 12:51:00 PM
I have a ListView (entityListView) with a ContextMenu (contextMenu). Overriding the Opening event of the ContextMenu, I'm trying to ensure that the ContextMenu does not appear if it not right-clicked over an existing item in the list view. In the code below, it appears that the Y location is st...more >>

Wrapping unmanaged C++ callbacks in C#
Posted by Marc Eaddy at 4/2/2008 12:18:01 PM
Hi, I have problem wrapping a callback declared in the unmanged C++ and call a function that sets the callback from C#. What I want to do is to first wrap an unmanaged C++ class using managed C++. Then I access this managed C++ code from my C# code. So here's the unmanaged C++ header: (I...more >>

Business Object Collection And DataGridView
Posted by Claude at 4/2/2008 11:00:02 AM
Here's an homemade Attribut class : public class Attribut { string m_sName; object m_oValue; public string Name { get { return m_sName;} } public object Value { get { return m_oValue; } set { m_oValue = value; } } public override string ToString() { if (m_oValue != ...more >>

Upcasting to List<ISomeInteface> ?
Posted by Jules Winfield at 4/2/2008 10:41:31 AM
One thing I've never really understood about C# is the inability to upcast generics based on templated type. If I have: interface ISomeInterface{} and class SomeClass:ISomeInterface{} and I have a List<SomeClass>, it seems like I should be able to assign it, or at least cast it, to a...more >>

is "params" working as expected
Posted by Claire at 4/2/2008 10:21:33 AM
Hi, either I'm going mad or is params not working anymore in VS 2005? I have function as follows public tableEquipment[] ReadEquipment(bool ReadImages, params Int64[] RecIDs) { } if I call "tableEquipment equipment = myDatabase.ReadEquipment(false, RecID);" I'm getting a compiler error...more >>

Returning multiple values
Posted by Steve at 4/2/2008 10:08:52 AM
If I have the following code, what do I have to change to make it return more than one value? public string Records { get { return textBoxName.Text; } //return textBoxAddress.Text; //return textBoxNotes.Text; } I can only retu...more >>

Click next once, Click back twice
Posted by MekkaNRG at 4/2/2008 10:01:18 AM
I'm just trying to make a simple flash card program when I click "next" it goes. When I click "back" it does nothing unless I click it twice.Then to goto the next one I have to click "next" twice. What's the deal? Thanks Here is the code, using System; using System.Collections.Generic; ...more >>

static events
Posted by parez at 4/2/2008 9:32:47 AM
Hi, I have implemented a static event. Is there anything special that i have do? Is thread safety an issue?...more >>

From a myTextBox.Text to a mySecureString.
Posted by thomasnguyencom at 4/2/2008 9:26:38 AM
What's the best way to handle this situation securely? I'm currently manually converting the string to a SecureString, but for some reason it looks ugly. public SecureString ConvertToSecureString (string str) { SecureString secureString = new SecureString(); foreach...more >>

C# Express with SQL Server
Posted by Laurent at 4/2/2008 8:30:55 AM
No amount of research will give me a definitive answer, so I turn to this newsgroup. For this project, I need to use SQL Server 2005 as the database server. Can I develop my application with C# Express? Do I rather need the full Visual Studio 2005 Standard? Or do I need to get the Visual S...more >>

Development Tool Recommendations
Posted by Robert Cramer at 4/2/2008 7:33:28 AM
I'm looking to formalize my development process and methodology and currently plan to use NUnit to assist with automated unit testing, and FxCop for code analysis - to help ensure that my code conforms to current guidelines. I have done some research and it appears that ReSharper is quite p...more >>

looking for IDE vs 2005 forum
Posted by raulavi at 4/2/2008 7:18:02 AM
hi all: any one can give me a link where to post questions about the vs 2005 ide? thanks I got one of my panels "Pending Checkins" under view toolbar not to open when I start my IDE, all the others are openning fine, (we use co-op for version control) ...more >>

Regex
Posted by AMP at 4/2/2008 6:46:18 AM
Hello, I have a Regex: Regex regex = new Regex(@"22 22 22 22 22 22 22 22 22 22(? <centervalue>.+)33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33"); Sometimes my data has 10 sets of "22"'s , sometimes 12, 14 ,ect. I want ...more >>

Free transformation of image shape.
Posted by oscar.holmberg@gmail.com at 4/2/2008 6:34:17 AM
Hi, I would like to transform the shape of an image in any ways. For example: I have a square image and let the corners be called a, b, c and d. Now I would like to "move" corner c straight up a few pixles and corner a straight down a few pixels. It would now feels like the image been "turned...more >>

how to add arrays to Ilist
Posted by jitendrapatil2006@gmail.com at 4/2/2008 3:19:22 AM
hey friends i am new to C# lang. can anybody tell me how to add arrays to Ilist and how to get the values from the list( means) how to traverse the list plz help me......more >>

check if object implements interface not working ;/
Posted by Jon Slaughter at 4/2/2008 1:41:36 AM
I wrote this function that is suppose to returnt rue if an array of types(actually stuff returned by GetInterfaces) implements the interface Q. private bool ContainsInterface<A, Q>(A[] list) { foreach (A a in list) if (a is Q) return true; return false; } ...more >>

Array to String
Posted by Piero at 4/2/2008 1:16:37 AM
Hi, i have a string array, how can i convert it to a string?...more >>

Cached Windows Service?
Posted by Matthias S. at 4/2/2008 1:07:49 AM
hello, i've written a windows service using .net framework 2.0 and c#. the service runs already for a couple of month and everything is fine so far. now i came to the point, that the service needs an update of the exectutable and a classlibrary it depends on. funny thing is, even if the servi...more >>

How to wrap unmanaged C++ code so as to use it from C#
Posted by Lonifasiko at 4/2/2008 12:38:32 AM
I must use some unmanaged C++ code functionality from my C# managed application. I do only have .cpp and .h files for that piece of code, nothing more. I understand I should wrap these files into a C++ project type so that later I can reference this project's output form my managed environmen...more >>

architecture question
Posted by Christian Havel at 4/2/2008 12:32:01 AM
Hi, if in a client-server application the server has to deal with about 1.000 clients is .NET Remoting (RPC) the right choice of the communication or is a message oriented communication (e.g. MSMQ) the better choice? Christian...more >>


DevelopmentNow Blog