Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
Questioncan I assign custom shortcuts to MenuItem.ShortCut? Pin
Anonymous23-Nov-04 14:06
Anonymous23-Nov-04 14:06 
AnswerRe: can I assign custom shortcuts to MenuItem.ShortCut? Pin
benjymous23-Nov-04 22:08
benjymous23-Nov-04 22:08 
GeneralRe: can I assign custom shortcuts to MenuItem.ShortCut? Pin
Heath Stewart24-Nov-04 5:53
protectorHeath Stewart24-Nov-04 5:53 
AnswerRe: can I assign custom shortcuts to MenuItem.ShortCut? Pin
Heath Stewart24-Nov-04 5:45
protectorHeath Stewart24-Nov-04 5:45 
QuestionWhat would the c# equivalent of make_pair be Pin
PaleyX23-Nov-04 11:13
PaleyX23-Nov-04 11:13 
AnswerRe: What would the c# equivalent of make_pair be Pin
Heath Stewart23-Nov-04 13:24
protectorHeath Stewart23-Nov-04 13:24 
GeneralRe: What would the c# equivalent of make_pair be Pin
PaleyX23-Nov-04 14:05
PaleyX23-Nov-04 14:05 
AnswerRe: What would the c# equivalent of make_pair be Pin
Nick Parker23-Nov-04 13:25
protectorNick Parker23-Nov-04 13:25 
You might look into classes that implement IDictionary, such as HybridDictionary[^]. The method access will be different but you will find what you need for version 1.1 of the framework to implement it. With version 2.0 of the .NET Framework you can do something as simple as the following with generics:

public class pair<T1, T2>
{
    public T1 First
    {
        get {return this.t1;}
        set {this.t1 = value;}
    }

    public T2 Second
    {
        get { return this.t2; }
        set { this.t2 = value; }
    }

    public pair(T1 type1, T2 type2)
    {
        this.t1 = type1;
        this.t2 = type2;
    }
    private T1 t1;
    private T2 t2;
}
/// Implementation
private void button1_Click(object sender, EventArgs e)
{
    pair<int, int> i = new pair<int, int>(5, 10);
    MessageBox.Show(string.Format("First value:{0}, second value:{1}",
        i.First.ToString(), i.Second.ToString()));
}


- Nick Parker
My Blog | My Articles

GeneralRe: What would the c# equivalent of make_pair be Pin
leppie24-Nov-04 6:09
leppie24-Nov-04 6:09 
GeneralRe: What would the c# equivalent of make_pair be Pin
Nick Parker24-Nov-04 7:23
protectorNick Parker24-Nov-04 7:23 
GeneralDynamically generate a MS Word document using ASP.Net Pin
john kuruvila23-Nov-04 10:59
john kuruvila23-Nov-04 10:59 
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
DavidNohejl23-Nov-04 11:34
DavidNohejl23-Nov-04 11:34 
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
Heath Stewart23-Nov-04 13:03
protectorHeath Stewart23-Nov-04 13:03 
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
DavidNohejl23-Nov-04 11:44
DavidNohejl23-Nov-04 11:44 
GeneralDynamically generate a MS Word document using ASP.Net Pin
john kuruvila23-Nov-04 10:56
john kuruvila23-Nov-04 10:56 
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
Heath Stewart23-Nov-04 12:59
protectorHeath Stewart23-Nov-04 12:59 
GeneralRe: Dynamically generate a MS Word document using ASP.Net Pin
john kuruvila23-Nov-04 13:32
john kuruvila23-Nov-04 13:32 
GeneralCenter of screen Pin
AlexMartins23-Nov-04 10:16
AlexMartins23-Nov-04 10:16 
GeneralRe: Center of screen Pin
Luis Alonso Ramos23-Nov-04 10:38
Luis Alonso Ramos23-Nov-04 10:38 
GeneralRe: Center of screen Pin
Daniel Turini24-Nov-04 1:17
Daniel Turini24-Nov-04 1:17 
QuestionBenefits of SqlTypes? Pin
sixefftee23-Nov-04 9:51
sixefftee23-Nov-04 9:51 
AnswerRe: Benefits of SqlTypes? Pin
Heath Stewart23-Nov-04 12:48
protectorHeath Stewart23-Nov-04 12:48 
GeneralRe: Benefits of SqlTypes? Pin
Charlie Williams23-Nov-04 13:12
Charlie Williams23-Nov-04 13:12 
GeneralRe: Benefits of SqlTypes? Pin
Heath Stewart23-Nov-04 13:13
protectorHeath Stewart23-Nov-04 13:13 
GeneralC# Question Pin
QzRz23-Nov-04 9:19
QzRz23-Nov-04 9:19 

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.