Groups | Blog | Home


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# > september 2007 > threads for friday september 21

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

Ahh not again!
Posted by Johnny E. Jensen at 9/21/2007 9:51:16 PM
Hello I have in a small application a usercontrol with 4 buttons. Btn1, Btn2, Btn3 and Btn4 these button is placed at the buttom of the usercontrol. On top of the usercontrol i place an anothe usercontrol depends on the buttons i click on. A little bit like the Outlook Side navigator. In...more >>


Cannot convert type 'int' to 'bool'
Posted by John at 9/21/2007 9:39:26 PM
The following code: int test = 1; bool isTrue = (bool)test; results in a compiler error: Cannot convert type 'int' to 'bool' wtf, any ideas on how to work around this?...more >>

dotnet to com
Posted by Filip Fransen at 9/21/2007 8:04:20 PM
Hi, I have a to create a com object from a dotnet class. Now I have the following questions : - with Queryinterface you can get all the interfaces from a com app. How can I expose my dotnet classes with Queryinterface. - I can convert a dotnet class with Marshal.GetIUnknowFromObject. Is it ...more >>

Proxy authentication when doing xsl transform
Posted by Chris Dunaway at 9/21/2007 7:17:06 PM
I am processing cXml orders and the xml begins with the following: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.017/ cXML.dtd"> I am attempting to use the following code to transform the xml: XslCompiledTransform transform = new ...more >>

Mock framework for .net
Posted by José Joye at 9/21/2007 4:45:06 PM
Hello, I'm currently looking at available open source "Mock" framework. I found some by googling around. Some seems active other are kind of sleeping... Nunit Mock, Nmock, Easy Mock .net, dotnet mock... Since I'm currently using Nunit, I would like to investigate "Nunit mock" in more d...more >>

System Directories
Posted by David McCallum at 9/21/2007 4:02:12 PM
How do I programatically get the locations of the following, "Documents" and "Public Documents" on a windows Vista system. Also if possible, does the same return the equivalent in WIndows XP. TIA David McCallum ...more >>

how to force a .net application to use .net 2.0 ?
Posted by Daniel at 9/21/2007 1:53:45 PM
how to force a .net application to use .net 2.0 ? this windows service is about 4 years old and im pretty sure is using .net 1.x runtime. Is there soem setting in the installer that says to use .net 2.0 instead of .net 1.0? this windows service is developed in visual studio 2002 ...more >>

Interview test......
Posted by Nicholls.Mark NO[at]SPAM mtvne.com at 9/21/2007 12:09:05 PM
I want to set some simple coding tests for an interview....Joel recommends (for C programmers).... 1. Reverse a string in place 2. Reverse a linked list 3. Count all the bits that are on in a byte 4. Binary search 5. Find the longest run in a string 6. atoi 7. itoa I'm tempted to use 1....more >>



Discover Multicast Address
Posted by iwdu15 at 9/21/2007 11:58:00 AM
Hi, im writing a program that uses the multicast address to send data to multiple clients at the same time. I would like to be able to get the multicast address of the current network programmatically...is this possible, and if yes, how? ive done google searches, yet i havent found a thing on ...more >>

Questions
Posted by count1986 NO[at]SPAM gmail.com at 9/21/2007 11:54:38 AM
Please anybody explain me (C#): 1. Why default constructors of structure types cannot be defined? 2. Why finalize method cannot be overrided in structure types? 3. Why structure type cannot be used as a base type? ...more >>

DateTimePicker and visibility to Min/Max Dates.
Posted by Chris Shepherd at 9/21/2007 11:53:59 AM
Greetings group, I have a situation where I'd like to visibly see disabled dates on a DateTimePicker. Frequently the Min and Max dates in the picker will be set only to days apart, and so I would like this to be reflected in a way other than it simply failing to select when they click. It s...more >>

Text boxes and string length
Posted by Lilith at 9/21/2007 10:04:49 AM
I'm looking at practical string lengths and the capacity of a text box. I'm using a string to progressively add the status of a process periodically and dumping that text into a text box. I don't mind trimming the first x number of lines from the string when it reaches certain limits, but I'd ...more >>

Removing events more than once
Posted by MikeP at 9/21/2007 9:10:06 AM
Hi there, I've tried hunting for this in the C# specs but can't find the relevant info. Does anyone know what the official rule says (or doesn't say) about removing an event more than once. If you apply "+=" to assign an event for instance, can you safely apply "-=" more than once or is thi...more >>

Simple Cloning Question
Posted by Dan Dorey at 9/21/2007 8:33:05 AM
I've implemented the ICloneable interface on a class of mine. I've implemented it in two different ways both of which I feel should work correctly, but only one does and I'd be curious to know why. Working: CallflowBase ret = null; ret = this.MemberwiseClone() as Cal...more >>

Win Form.Close Handler
Posted by Looch at 9/21/2007 8:24:53 AM
Hi All, How can I add a handler to the closing of a windows form if the user selects the 'X' in the upper right hand corner of a form? Basically I'd like to make sure that certain text boxes are filled in before the form can be closed. I haven't had the need for handlers untill now so I'm def...more >>

Partial implementation of interface
Posted by Advait Mohan Raut at 9/21/2007 8:14:58 AM
Hello friends, I am new to C#. I have some fundamental doubt. Please, try to answer it. 1) Ltes say, IFace is an interface which has proto of two methods. class A implements IFase. interface IFace { void func1(...) {.....} void func2(...) {.....} } class A : IFace { void fu...more >>

Cloning Question
Posted by Dan Dorey at 9/21/2007 8:04:57 AM
I've implemented the ICloneable interface on one of my class. I've written this simple code in two different ways and I think both should work but it's not the case and I'm curious to understand why. The working method: CallflowBase ret = null; ret = this.MemberwiseClone() as CallflowBase; ...more >>

Optimize an IEnumerable
Posted by timor.super NO[at]SPAM gmail.com at 9/21/2007 7:18:44 AM
Hi group, imagine I want to find number of values of a word in a string ... Look at my code : List<string> thingsToFind = new List<string>(new string[] {"error", "values"}); MyClass myClass = new MyClass(thingsToFind, data); foreach (KeyValuePair<int, string> aVal...more >>

IDE question
Posted by Jesper, Denmark at 9/21/2007 4:16:01 AM
Back in the good oll VS 6.0 days, programming c++, when I wrote the command 'break', the e.g. 'while' clause I was breaking out of was shortly highligted much like scopes are paired/highlighted in VS 2005. Anyone know of a plugin of some kind available for VS 2005 for that kind of candy? ...more >>

How to invoke COM members
Posted by nano2k at 9/21/2007 3:22:59 AM
Hi I need to implement a method like this: object InvokeCOMMember(object obj, string memberName, params object[] parameters); The method takes a COM class reference (obj) and tries to invoke a member (memberName) using the specified parameters (parameters), then returns the result back. ...more >>

ComboBox drop down button
Posted by Jesper, Denmark at 9/21/2007 12:58:00 AM
Hi, I have a combobox on a form with dropdown style. Is it possible to 'push' the dropdown arrow button from code - causing the combobox to dropdown. regards Jesper, DK...more >>

displaying bitflags as enumerated text and not int
Posted by Peted at 9/21/2007 12:25:48 AM
Hi i am trying to make a small mdoification to and exisiting dll control, in its source code. Im trying to expose one of its internal properties so the user can set it in the ide at designtime, but the property consists of enumerated constants used in bit operations, and when the values are...more >>

ridiculous
Posted by Jon Slaughter at 9/21/2007 12:00:00 AM
I was using ints for all my code which involved a lot of bitwise logic. Since in actuality I was just working with bytes I decided to change all the ints to bytes. Now none of my code works... I have to explicitly cast any time I use a bitwise operator just because C# thinks it has to be an in...more >>

how to set default values in instantiating a generic List<>
Posted by Peted at 9/21/2007 12:00:00 AM
I have the following code public enum pdfFlags { PFD_DRAW_TO_WINDOW, PFD_DRAW_TO_BITMAP, PFD_SUPPORT_GDI, PFD_SUPPORT_OPENGL, PFD_GENERIC_ACCELERATED, PFD_GENERIC_FORMAT, PFD_NEED_PALETTE, PFD_NEED_SYSTE...more >>

How can I share a resource File between 2 projects in the same Solution?
Posted by Daniel Jeffrey at 9/21/2007 12:00:00 AM
I have created a Resource file that stores common icons used in my projects. I have a solution that contains 2 projects, and I keep getting errors if I add the resource file to both projects. It complains about duplicates etc etc. I have tried adding it to the Solution, but then it doesn'...more >>

Throw without parameter...
Posted by AshokG at 9/21/2007 12:00:00 AM
Hi, If you use just throw without parameter should preserve the complete stack trace and the exception information. for example: 1. private void Bar() 2. { 3. try 4. { 5. string s = null; 6. if (s.Length == 0) 7. return; 8. } 9. catch 10. { 11. // do some proce...more >>

LSP Implementation for bandwidth restriction
Posted by salman at 9/21/2007 12:00:00 AM
Hi I am working on a trading application server, normally 25-30 clients connect to server in a time. And server continuously sending trading data to clients. I want to restrict server that, it should not send over 4KB/sec data to a client. I found LSP (Layered Service Provider) that can do this...more >>

Dynamic Class Creation
Posted by herbert422 at 9/21/2007 12:00:00 AM
I am trying to instantiate a new class using Activator.CreateInstance(). The class is actually a window's form. When the process executes the CreateInstance() method it generates an exception. The exception states that it could not find an assembly. In the original project that generated the d...more >>

Invitation to trying my project - BOS (a general purpose framework)
Posted by Born Bugler at 9/21/2007 12:00:00 AM
Hi, this is Born Bugler. My interests include architecture design and 3D programming. I would like to share my latest project with you and am looking forwatd to receiving your suggestions or criticisms. :-) The project was mostly written in C#, though part of it was in C++/CLI. Project desc...more >>


DevelopmentNow Blog