Click here to Skip to main content
15,883,959 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
Kannan Kalyanaraman27-Aug-03 1:21
Kannan Kalyanaraman27-Aug-03 1:21 
GeneralRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
Eric Marchesin27-Aug-03 2:02
Eric Marchesin27-Aug-03 2:02 
GeneralRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
leppie27-Aug-03 10:30
leppie27-Aug-03 10:30 
GeneralRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
Eric Marchesin27-Aug-03 23:54
Eric Marchesin27-Aug-03 23:54 
GeneralRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
leppie28-Aug-03 6:58
leppie28-Aug-03 6:58 
AnswerRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
Meysam Mahfouzi27-Aug-03 1:28
Meysam Mahfouzi27-Aug-03 1:28 
GeneralRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
Eric Marchesin28-Aug-03 1:03
Eric Marchesin28-Aug-03 1:03 
AnswerRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
Alvaro Mendez27-Aug-03 9:31
Alvaro Mendez27-Aug-03 9:31 
I think there's not much you can do. If you're trying to achieve the same effect as const in C++, the news is that in C++ you can just as easily cast away constness and have the same issue.

Here's my viewpoint:

You as the programmer are doing all you can to make your collection readonly. If someone wants to modify it badly enough, they'll have to take the extra step of casting it and in doing so they assume the responsibility of what problems that may cause.

In other words, it's not your problem. There's only so much you can do and spending time worrying about what some hacker may do is not worth it, IMHO.

Regards,
Alvaro




Hey! It compiles! Ship it.
GeneralRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
Alvaro Mendez27-Aug-03 10:47
Alvaro Mendez27-Aug-03 10:47 
GeneralRe: How to create a property to get a list on which it'd be impossible to add, replace or remove items ? Pin
Anonymous27-Aug-03 23:52
Anonymous27-Aug-03 23:52 
GeneralC# applect param pass problem Pin
aw1ay26-Aug-03 20:34
aw1ay26-Aug-03 20:34 
GeneralGPRS communication - PocketPC-SmartPhone.. Pin
ZippyBubbleHead26-Aug-03 20:14
ZippyBubbleHead26-Aug-03 20:14 
Generalhelp option... Pin
Member 52474026-Aug-03 20:05
Member 52474026-Aug-03 20:05 
GeneralRe: help option... Pin
Kannan Kalyanaraman27-Aug-03 23:19
Kannan Kalyanaraman27-Aug-03 23:19 
Generalchecking items in a ListView Pin
Member 50926226-Aug-03 20:02
Member 50926226-Aug-03 20:02 
GeneralRe: checking items in a ListView Pin
ZippyBubbleHead26-Aug-03 20:38
ZippyBubbleHead26-Aug-03 20:38 
GeneralRe: checking items in a ListView Pin
Member 50926226-Aug-03 21:55
Member 50926226-Aug-03 21:55 
General#include "wincrypt" Pin
devvvy26-Aug-03 19:06
devvvy26-Aug-03 19:06 
GeneralRe: #include "wincrypt" Pin
David Stone26-Aug-03 19:40
sitebuilderDavid Stone26-Aug-03 19:40 
GeneralRe: #include "wincrypt" Pin
devvvy26-Aug-03 19:54
devvvy26-Aug-03 19:54 
GeneralGetting an intersect of a color Pin
Ista26-Aug-03 16:01
Ista26-Aug-03 16:01 
GeneralRe: Getting an intersect of a color Pin
Christian Graus26-Aug-03 16:11
protectorChristian Graus26-Aug-03 16:11 
GeneralRe: Getting an intersect of a color Pin
Ista26-Aug-03 16:12
Ista26-Aug-03 16:12 
GeneralRe: Getting an intersect of a color Pin
Christian Graus26-Aug-03 16:14
protectorChristian Graus26-Aug-03 16:14 
GeneralRe: Getting an intersect of a color Pin
Ista26-Aug-03 16:17
Ista26-Aug-03 16:17 

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.