Click here to Skip to main content
15,902,774 members
Home / Discussions / C#
   

C#

 
AnswerRe: Undo() Method? Pin
sharpiesharpie11-Feb-07 6:52
sharpiesharpie11-Feb-07 6:52 
GeneralRe: Undo() Method? Pin
Stefan Troschuetz11-Feb-07 7:55
Stefan Troschuetz11-Feb-07 7:55 
GeneralRe: Undo() Method? Pin
sharpiesharpie11-Feb-07 9:35
sharpiesharpie11-Feb-07 9:35 
GeneralRe: Undo() Method? Pin
Stefan Troschuetz11-Feb-07 20:39
Stefan Troschuetz11-Feb-07 20:39 
AnswerRe: Undo() Method? Pin
Stefan Troschuetz11-Feb-07 7:50
Stefan Troschuetz11-Feb-07 7:50 
AnswerRe: Undo() Method? Pin
ShermansLagoon11-Feb-07 19:50
ShermansLagoon11-Feb-07 19:50 
QuestionOpacity Pin
Fco. Javier Marin11-Feb-07 4:46
Fco. Javier Marin11-Feb-07 4:46 
QuestionArrayList with restricted access Pin
Mark T.11-Feb-07 4:11
Mark T.11-Feb-07 4:11 
I have a class with a function that returns an ArrayList.

The problem is that I don't want any client that calls the function to be able to add or delete items from the ArrayList. I want to force the client to use my class' other functions to make any modifications (because related data has to be updated).

Unfortunately, speed is an issue, so I can't just copy the ArrayList and send the copy. Also, a copy would allow the client to think he is making a change when it is actually being ignored. I'd prefer him to get a compile error if he calls Add(), for instance.

I can't find any C# syntax that can make a returned value (or a returned parameter) read only. (The C# "readonly" syntax won't let the client replace the ArrayList with another, but WILL let the client change the content of the ArrayList, and so it is insufficient).

Any ideas would be appreciated.


Mark
11 Feb 2007

AnswerRe: ArrayList with restricted access Pin
Stefan Troschuetz11-Feb-07 4:30
Stefan Troschuetz11-Feb-07 4:30 
AnswerRe: ArrayList with restricted access Pin
Luc Pattyn11-Feb-07 5:43
sitebuilderLuc Pattyn11-Feb-07 5:43 
GeneralRe: ArrayList with restricted access Pin
Mark T.11-Feb-07 10:51
Mark T.11-Feb-07 10:51 
AnswerRe: ArrayList with restricted access Pin
Syed Muhammad Kamran12-Feb-07 2:02
Syed Muhammad Kamran12-Feb-07 2:02 
QuestionDisabling Windows Buttons: Minimize,Restore,Close Pin
Blekk11-Feb-07 4:06
Blekk11-Feb-07 4:06 
AnswerRe: Disabling Windows Buttons: Minimize,Restore,Close Pin
Stefan Troschuetz11-Feb-07 4:24
Stefan Troschuetz11-Feb-07 4:24 
AnswerRe: Disabling Windows Buttons: Minimize,Restore,Close [modified] Pin
sharpiesharpie11-Feb-07 4:29
sharpiesharpie11-Feb-07 4:29 
GeneralRe: Disabling Windows Buttons: Minimize,Restore,Close Pin
Blekk11-Feb-07 6:14
Blekk11-Feb-07 6:14 
GeneralRe: Disabling Windows Buttons: Minimize,Restore,Close Pin
Blekk11-Feb-07 6:24
Blekk11-Feb-07 6:24 
GeneralRe: Disabling Windows Buttons: Minimize,Restore,Close Pin
sharpiesharpie11-Feb-07 6:56
sharpiesharpie11-Feb-07 6:56 
QuestionDisplaying a message when closing Pin
Blekk11-Feb-07 3:22
Blekk11-Feb-07 3:22 
AnswerRe: Displaying a message when closing Pin
cellardoor071611-Feb-07 3:46
cellardoor071611-Feb-07 3:46 
GeneralRe: Displaying a message when closing Pin
Blekk11-Feb-07 3:56
Blekk11-Feb-07 3:56 
QuestionIsNumeric Pin
IgorMI511-Feb-07 3:21
IgorMI511-Feb-07 3:21 
AnswerRe: IsNumeric Pin
Stefan Troschuetz11-Feb-07 4:35
Stefan Troschuetz11-Feb-07 4:35 
AnswerRe: IsNumeric Pin
ali_reza_zareian11-Feb-07 10:12
ali_reza_zareian11-Feb-07 10:12 
AnswerRe: IsNumeric Pin
Tim Paaschen11-Feb-07 20:47
Tim Paaschen11-Feb-07 20:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.