|
Guffa wrote: When you change the object, the change is visible from both lists, as they both reference the same object.
are you sure about this. Im sure that they are not both reference the same object.
in this case mainlist is unaffected from any changes, because ".ToList()" returns new copies.
modified on Monday, July 21, 2008 12:13 PM
|
|
|
|
|
enginço wrote: Im sure that they are not both reference the same object.
Good for you.
Try it and be absolutely sure, it only takes some 10 lines of code to prove you right or wrong.
|
|
|
|
|
enginço wrote: are you sure about this.
Yes, I am absolutely sure about this.
To be really really absolutely 100% sure, I verified that the lists contains the same objects, and that changes to the object in one list is visible through the other list.
enginço wrote: in this case mainlist is unaffected from any changes, because ".ToList()" returns new copies.
No, it doesn't. There is no constraint that the class in the generic enumeration has to have a public parameterless constructor or implement the IClonable interface, so the method can't create copies.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
yes you are right,
but I was absolutely sure before write. I tried two times to be sure.
methinks, I lost in my codes.
IT'S MY FAULT.
Hmmm, my eyes may be broken but where is my rationality?
may be I should less work.
I tried if you know or don't :P
over and over again I'm sorry
modified on Tuesday, July 22, 2008 3:25 AM
|
|
|
|
|
hi,
I have two issues, if u could help, would be a great assistance.
- line.unregister() using sipxtapidotnet api does not work although line.register works. why? is there any bug in sipxtapi or I am missing something?
- I want to register my line extensions to sip proxy server using sipXtapidotnet api, but how can i do that because there is only line.register() method which registers the line to the proxy server not the extentions.
Regards
Atif Ali Bhatti.
|
|
|
|
|
You would probably be better off checking with the vendor of the sipxtapidotnet api.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi,
thnx for the reply but why i asked here is due the fact that sipXtapidotnet is an open souce api and has no documentation or i might not be able to find. so there would be some one could help me out. could u as well.
thnx
Atif Ali Bhatti.
|
|
|
|
|
They have an open forum on sourceforge here[^].
Dave
|
|
|
|
|
hi,
yeah it is there but i have used my options there.
atif ali bhatti.
|
|
|
|
|
Hello,
VS 2008
I am adding menuItems to a menuContext. However, I only want to allow a maximum of 10 menuItems to be added. This works ok.
However, if a menuItem is about to be added. Which is already contained in the menuContext. Then I want to get the index of this, so that I can remove it. And add in index 0.
The idea is to add phone numbers, and display the most recent one that was dialed. This is why I am adding at index 0. However, if a phone number is already in the menuContext then I need to find it so that I can remove it.
I have tried using the contains, Find, and IndexOf methods, but no use. See comments below.
I have tried using the Dictionary and IList to keep track of the items. However, this doesn't seem be the right solution either.
Many thanks for any suggestions,
<br />
<br />
public void AddToRedialHistory(string number) <br />
{ <br />
this.shortcutRedialMenu = new MenuItem(); <br />
this.shortcutRedialMenu.Text = number; <br />
<br />
<br />
<br />
int count = this.ctxRedialMenu.MenuItems.Count; <br />
if (count > 9) <br />
{ <br />
this.ctxRedialMenu.MenuItems.RemoveAt(9); <br />
} <br />
<br />
this.ctxRedialMenu.MenuItems.Add(0, shortcutRedialMenu); <br />
<br />
<br />
this.shortcutRedialMenu.Click += new EventHandler(this.ShortCutRedial_Clicked); <br />
} </string>
|
|
|
|
|
Hello All,
Please I need to know how to create a DropDownList like that of the Font dropdownlist of the microsoft word. In the way that when you choose a font from that list it's put in the top seperated part of the list.
What I'll do is that I'll get the items from a query result but some of those are put in the above section where all the others are put in the second part.
Thanks in advance.
|
|
|
|
|
Hi,
I'm facing a problem while transmitting a live video on LAN using memory stream object.
But when I run application,after some time,my system prompt me "Low virtual memory".
Actually the reason is the Memory stream.As there are two ways to convert the BMP into Byte ARRAY i.e Stream or File so tell me any solution or any other better way to convert Bitmap object into ByteArray.
Thanx and plzzzzzzzzzz reply
Shanzay
|
|
|
|
|
|
AtulRane wrote: You can solve your problem by increasing the size of virtual memory.
Don't do this.
If you are running out of virtual memory after you app has been running for a while, it's because your app has a memory leak. Make sure you are disposing of objects properly when they are done with. Use a tool like SysInternals process monitor to check how much memory your app is using, and if it is increasing over time.
Simon
|
|
|
|
|
Simon Stevens wrote: Don't do this.
If you are running out of virtual memory after you app has been running for a while, it's because your app has a memory leak.
Exactly, increasing virtual memory is only going to buy a little more time, not much.
Simon Stevens wrote: Use a tool like SysInternals process monitor to check how much memory your app is using
Or just use the Performance monitor in Administrative Tools.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Is this with a single stream? Are you sure that you are properly disposing of your stream objects after you have used them?
|
|
|
|
|
Hi,
I want to design an application that loads a Web-page and fills in the fields of the Web- form. The Web-page that I am trying to fill in is created by me. For example on the webpage I have a field called "Name" then next to the Name Text field I have kept a search button, clicking on which will lead to a list containing some names. The application will select the required name and that name will be filled in the Name Text Box. But I don't understant How can I be able to auto generate a mouse click event at that button.
I will be highly obliged if anybody can help me.
Thanks and Regards,
Purusottam Mishra
Purusottam Mishra
Systems Executive
|
|
|
|
|
I am able to load the web page into my application using Webbrowser control but I am unable to access the fields of the Web page, say its button controls, text controls etc. How Can I achieve this. Please help.
Purusottam Mishra
Systems Executive
|
|
|
|
|
I want to make a control which shape is a line(not only horizontal and vertical but also bias) , i tried to use the graphicpath but this class cannot only add a line . i am hurry for the solution ,hope someone can help me thank you !
|
|
|
|
|
neeka wrote: i tried to use the graphicpath but this class cannot only add a line
Yes, it can.
|
|
|
|
|
can you tell me the details or the method directly? i cannot understander you attach files.thank you
|
|
|
|
|
Hi everybody,
I'm trying to get a class to appear in a property grid control, and I can do all the basic stuff (assign descriptions to properties etc and get the object to appear in the property grid), however I also want a more complex form to pop up when I click on a more complex property.
Not sure if the above makes sense (if I knew the correct word for what I'm looking for I would have found it on Google by now!), so an example to help:
For example, a font dialog appears when changing the font on a control, by clicking on "..." in the Properties window next to "font"
What I want is to have a property which when clicked gives a "..." button, and when clicked pops up a form to help the programmer/user to set up the object properties.
Hopefully this makes some sense to somebody.
Any help would be appreciated.
Thanks,
Chris
|
|
|
|
|
Look at TypeConverter and UITypeEditor
|
|
|
|
|
UITypeEditor seems to be exactly what I need!
Thanks (esp for the quick reply!),
Chris
|
|
|
|
|