Click here to Skip to main content
15,890,845 members
Home / Discussions / C#
   

C#

 
Questionthumb.db file is not updating itself Pin
Shoaib Hussain28-Jun-07 1:38
Shoaib Hussain28-Jun-07 1:38 
QuestionFile Locking Pin
scotlandc28-Jun-07 1:03
scotlandc28-Jun-07 1:03 
AnswerRe: File Locking Pin
Le centriste28-Jun-07 3:03
Le centriste28-Jun-07 3:03 
GeneralRe: File Locking Pin
scotlandc28-Jun-07 3:21
scotlandc28-Jun-07 3:21 
GeneralRe: File Locking Pin
Amar Chaudhary28-Jun-07 3:55
Amar Chaudhary28-Jun-07 3:55 
Questionmembership API Pin
sangramkp28-Jun-07 0:53
sangramkp28-Jun-07 0:53 
AnswerRe: membership API Pin
Christian Graus28-Jun-07 1:46
protectorChristian Graus28-Jun-07 1:46 
QuestionHowto? ClassName.Items["item_name"].Property_name Pin
hkai28-Jun-07 0:47
hkai28-Jun-07 0:47 
Hi,
I was developing a small project using .Net 1.1, and here's some details:

public class MenuList
{
private Hashtable MenuItems= new Hashtable();
public void AddMenuItem(MenuItem oItem)
{
MenuItems.Add(oItem.Name, oItem);
}

public MenuItem this[string name]
{
get
{
return (MenuItem)MenuItems[name];
}
}

}

public class MenuItem
{
public string sTitle;
private string sName;
public string Name
{
get
{
return sName;
}
set
{
sName=value;
}
}

}

In this way, I can create MenuItem, add to MenuList, and access the MenuItem through it's name:
MenuItem i1=new MenuItem();
i1.Name="i1";
MenuList l1= new MenuList();
l1.AddMenuItem(i1);
l1["i1"].sTitle="abcd";

My question is: clients request to access the MenuItem this way:
l1.Items["i1"].sTitle="this way";

So how can I do it?



Yours Tully
Huang Kai
AnswerRe: Howto? ClassName.Items["item_name"].Property_name Pin
giddy_guitarist28-Jun-07 1:24
giddy_guitarist28-Jun-07 1:24 
GeneralRe: Howto? ClassName.Items["item_name"].Property_name Pin
hkai28-Jun-07 1:36
hkai28-Jun-07 1:36 
GeneralRe: Howto? ClassName.Items["item_name"].Property_name Pin
Luc Pattyn28-Jun-07 2:07
sitebuilderLuc Pattyn28-Jun-07 2:07 
GeneralRe: Howto? ClassName.Items["item_name"].Property_name Pin
giddy_guitarist29-Jun-07 3:30
giddy_guitarist29-Jun-07 3:30 
AnswerRe: Howto? ClassName.Items["item_name"].Property_name Pin
Le centriste28-Jun-07 3:08
Le centriste28-Jun-07 3:08 
QuestionSystem Information Pin
M. J. Jaya Chitra28-Jun-07 0:09
M. J. Jaya Chitra28-Jun-07 0:09 
AnswerRe: System Information Pin
Manas Bhardwaj28-Jun-07 0:19
professionalManas Bhardwaj28-Jun-07 0:19 
GeneralRe: System Information Pin
M. J. Jaya Chitra28-Jun-07 0:27
M. J. Jaya Chitra28-Jun-07 0:27 
AnswerRe: System Information Pin
Luc Pattyn28-Jun-07 0:24
sitebuilderLuc Pattyn28-Jun-07 0:24 
Questionaccessing data from one form in another form [modified] Pin
DKalepu27-Jun-07 23:44
DKalepu27-Jun-07 23:44 
AnswerRe: accessing data from one form in another form Pin
Christian Graus28-Jun-07 0:16
protectorChristian Graus28-Jun-07 0:16 
GeneralRe: accessing data from one form in another form Pin
DKalepu28-Jun-07 0:21
DKalepu28-Jun-07 0:21 
GeneralRe: accessing data from one form in another form Pin
Manas Bhardwaj28-Jun-07 0:26
professionalManas Bhardwaj28-Jun-07 0:26 
AnswerRe: accessing data from one form in another form Pin
Chintan.Desai28-Jun-07 0:36
Chintan.Desai28-Jun-07 0:36 
GeneralRe: accessing data from one form in another form Pin
DKalepu28-Jun-07 1:20
DKalepu28-Jun-07 1:20 
GeneralRe: accessing data from one form in another form Pin
Luc Pattyn28-Jun-07 1:40
sitebuilderLuc Pattyn28-Jun-07 1:40 
QuestionMasked TextBox .Net 2.0 Pin
KrunalC27-Jun-07 23:30
KrunalC27-Jun-07 23:30 

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.