Click here to Skip to main content
15,913,182 members
Home / Discussions / C#
   

C#

 
Questionsolving maze program Pin
sobu5-May-08 22:22
sobu5-May-08 22:22 
AnswerRe: solving maze program Pin
Abhijit Jana5-May-08 22:47
professionalAbhijit Jana5-May-08 22:47 
AnswerRe: solving maze program Pin
Reelix5-May-08 22:52
Reelix5-May-08 22:52 
AnswerRe: solving maze program Pin
PIEBALDconsult6-May-08 5:45
mvePIEBALDconsult6-May-08 5:45 
QuestionKeeping count of total Pin
MumbleB5-May-08 21:36
MumbleB5-May-08 21:36 
AnswerRe: Keeping count of total Pin
Christian Graus5-May-08 21:58
protectorChristian Graus5-May-08 21:58 
GeneralRe: Keeping count of total Pin
MumbleB5-May-08 23:39
MumbleB5-May-08 23:39 
GeneralRe: Keeping count of total Pin
Christian Graus6-May-08 1:13
protectorChristian Graus6-May-08 1:13 
GeneralRe: Keeping count of total Pin
MumbleB6-May-08 1:25
MumbleB6-May-08 1:25 
GeneralRe: Keeping count of total Pin
Christian Graus6-May-08 1:29
protectorChristian Graus6-May-08 1:29 
GeneralRe: Keeping count of total Pin
Christian Graus6-May-08 22:15
protectorChristian Graus6-May-08 22:15 
GeneralRe: Keeping count of total Pin
MumbleB7-May-08 1:56
MumbleB7-May-08 1:56 
GeneralRe: Keeping count of total Pin
Christian Graus7-May-08 11:56
protectorChristian Graus7-May-08 11:56 
QuestionDisplaying a form from en existing form Pin
Berlus5-May-08 21:35
Berlus5-May-08 21:35 
AnswerRe: Displaying a form from en existing form Pin
Abhijit Jana5-May-08 21:55
professionalAbhijit Jana5-May-08 21:55 
AnswerRe: Displaying a form from en existing form Pin
Christian Graus5-May-08 22:00
protectorChristian Graus5-May-08 22:00 
QuestionCheckBox in ListView Pin
stancrm5-May-08 21:28
stancrm5-May-08 21:28 
AnswerRe: CheckBox in ListView Pin
Christian Graus5-May-08 22:09
protectorChristian Graus5-May-08 22:09 
QuestionIndexers Pin
Steve Declerck5-May-08 20:44
Steve Declerck5-May-08 20:44 
AnswerRe: Indexers Pin
Vikram A Punathambekar5-May-08 20:59
Vikram A Punathambekar5-May-08 20:59 
Steve Declerck wrote:
Every individual element of MyStrings can be accessed through MyStrings[i]. WHy still additional code for indexing ?


But your data should be private. The indexer allows you to expose a public interface (don't confuse that with a C# interface) for your private data. Of course, you could do away with an indexer and use a GetXXX(int index) method, but indexers are elegant. You are not limited to integers; you can also use other types for the indexer.

Steve Declerck wrote:
public string this[int index]

What is the meaning of "this" ?


this is a keyword used to refer to the home object, i.e., the object on which the code is operating.

I don't mean to be condescending, but a good book will explain all of this in greater detail. I'd recommend Andrew Troelsen.

Cheers,
Vikram.
The hands that help are holier than the lips that pray.

GeneralRe: Indexers Pin
Steve Declerck5-May-08 23:15
Steve Declerck5-May-08 23:15 
AnswerRe: Indexers Pin
PIEBALDconsult6-May-08 6:05
mvePIEBALDconsult6-May-08 6:05 
QuestionWorkFlow Project In Visual Studio 2005 Pin
Thaer Hamael5-May-08 19:29
Thaer Hamael5-May-08 19:29 
AnswerRe: WorkFlow Project In Visual Studio 2005 Pin
John_Adams5-May-08 20:57
John_Adams5-May-08 20:57 
GeneralRe: WorkFlow Project In Visual Studio 2005 Pin
Thaer Hamael6-May-08 1:20
Thaer Hamael6-May-08 1:20 

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.