|
Yep - I'm going to try some activity that doesn't require a lot of brain power. I'm going to paint my hallway.
|
|
|
|
|
And the color of the day is - black I presume?
Happy painting!
-Larantz-
|
|
|
|
|
Dulux Daffodil white in a silk finish, actually.
|
|
|
|
|
That's me finished one wall and I've cleaned up for the evening. Tomorrow I'll try and finish the rest of the hall. (Well, at least the first coat - The previous owners had a big brown rectangle painted on the wall, I think that area might require an extra coat because I can still see it, just.)
|
|
|
|
|
At the risk of hijacking the OP's question, what sort of problem maps more appopriately to a nested "composition" design?
I just read one illustration that used a car and its engine as an example. They argued that composition, and a nested engine class, made sense, because a car cannot work without an engine. But this doesn't make much sense to me, as a car could have any number of types of engine or the engine could be removed completely (as happened to my car yesterday) and replaced.
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
Hi,
you don't need nested classes: you can create all classes at the top level of some namespace.
IF a class is to be used only inside some other class, then you CAN turn it into a nested
class, and completely hide it from the outside world. That would offer a higher degree of
encapsulation, at the risk that you sooner or later want to use the inner class independent
of the containing class...
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Ah, thanks Luc.
The more I know about C# the less I know - and there's another mystery solved.
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
Is there any way to change the position of the help panel in a PropertyGrid in code?
|
|
|
|
|
Sorry, I don't think so. If you use Reflector[^] to view the source for the PropertyGrid you can see that the private method OnLayoutInternal positions the help panel (this is called doccomment in OnLayoutInternal).
The best you can do is hide it. You may be able to request such a feature from a third-part vendor (such as SmartPropertyGrid[^]).
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
How do you hide it? I have a situation where I want a fairly simple PropertyGrid, but I do not want the help panel to display.
Thanks,
John
|
|
|
|
|
As Tom said, the MS PropertyGrid can't do it. However, Smart PropertyGrid.Net can definitely position the comments area the way you want (some of my customers wrote a piece of code so that the size is adaptable to the height of the comments).
|
|
|
|
|
Hi,
I wrote a web service which needs to return a list of string objects. I tried using string[] as my return value and couldn't get that to work. I then tried using an ArrayList and couldn't get that to work either. I read some stuff on it and in my program which uses the web service I could get my string values like this:
Object[] items = GetItems();
I then cast my items back to strings.
This is OK but how can I get the actual ArrayList back?
ArrayList items = GetItems();
Thanks 
|
|
|
|
|
Hm.
I stopped using ArrayList a while back when generic lists came.
For instance: List<string> items .
I'f my memory hasen't failed me completely, you should only have to set the method returnvalue to ArrayList, like public ArrayList GetItems(); and return your ArrayList in a normal fashion.
Have you tried using generic lists?
-Larantz-
|
|
|
|
|
No I will give that a try thanks 
|
|
|
|
|
Passing back ArrayList works fine if the web service is in the same project as the calling code but doesn't work if I've built a separate application to call the method passing it back.
I have to get the result by assigning it as Object[] .
If I use List<string> as my return type, in my calling application it only works if I assign the return value to string[] . This works fine but I can't help thinking that my calling application should be using the actual return type.
Am I missing something?
This is the sample response from the web service:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfString xmlns="MyWebService">
<string>string</string>
<string>string</string>
</ArrayOfString>
So the web service is expecting to be able to send back "ArrayOfString". Why can I not assign the return value to List<string>?
|
|
|
|
|
How do I use C# to run another exe program? like in C we can use system function, is there something similar in C# ??
Thanks,
Samuel
|
|
|
|
|
This question has been asked a number of times already, have you searched the forums? A quick google search for "C# run another program" reveals the info you need.
|
|
|
|
|
Would it have hurt you to have given an informative reply. For sure he could have googled it... you obviously did to know for sure that it was there... Could you not have at least put a link to the first result?
|
|
|
|
|
Catch a man a fish, you've fed him for a day. Teach a man to fish, you've fed him for life.
|
|
|
|
|
Hear hear!
-Larantz-
|
|
|
|
|
How to catch fish? Plz send codes.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"I haven't spoken to my wife now for 48 hours. I don't like to interrupt her.
|
|
|
|
|
malcolm!
this ur professor from university. i have a doubt on ur ethical sensual natures. u must no post my homowork on the cpiansex. i tell class u must no post fishing homoworks on the cians next time i bend u over bare buttocks and spank u in front of all classes to shame u. black grade for u this semester. CURSES OF DARK SHIVA ON U ETERNITY EVERLASTING!!!1!
Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas
|
|
|
|
|
Light a man a fire you've warmed him for a night. Light a man on fire you've warmed him for life.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
Darn the luck. I was going to post a similar reply but then I thought maybe I shouldn't. You must be a sick individual, and yes it takes one to know one.
BDF
|
|
|
|
|
I've been justly acused of many things in my life. Normalcy has never been one of them.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|