Search Result

Collapse
5 results in 0.0039 seconds.
Keywords
Members
Tags
collection
  •  

  • NeoPa
    started a topic How do I Reference an Item in a Collection by Name

    How do I Reference an Item in a Collection by Name

    This may be more complicated than indicated by the title as the collection I'm referring to is a CommandBars collection found in a Microsoft.Offic e.Interop.Outlo ok.Inspector from VSTO 2005 SE.

    In Outlook VBA I might typically have an Inspector object (equivalent to Microsoft.Offic e.Interop.Outlo ok.Inspector in C#) named VBAInspector and within that Inspector I could refer to :
    Code:
    VBAInspector.CommandBars("View")
    ...
    See more | Go to post

  • Binding a ComboBox to a custom collection

    It's pretty simple to programmaticall y add items to a combobox at runtime. Just declare the object, then call ComboBox.Items. Add(...) for each item you wish to add. The one downside to this method is that you cannot specify values for the display member - the text shown in the ComboBox item - and the value member - the value returned when you query the combobox's SelectedValue property.

    The simple way round this is to bind the combobox...
    See more | Go to post

  • How to loop through DataRow[] to get the column name and value

    Hi
    I have a DataTable and get selected values out of it in a DataRow collection. I have the code that I want to make it run. Not sure if this is the correct approach to store column names and value in memory for later use?
    Code:
    DataTable dt = ds.Tables["Employee"];
    DataRow[] foundEmpRows = dt.Select("Dept = 10");
    
    NameValueCollection nvEmp = new NameValueCollection();
    foreach (DataRow
    ...
    See more | Go to post

  • Using collections as key in Dictionary<TKey, TValue>

    Hello, I am creating a program that has a byte[] used as the key for a Dictionary class. The problem is best described with an example:

    (C# example of problem)
    Code:
            private Dictionary<byte[], string> dictionary;
    
            public void Method1()
            {
                // Set up the dictionary
                dictionary = new Dictionary<byte[], string>();
                byte[]
    ...
    See more | Go to post

  • What is the "pinned" keyword and how do I use it in MS VC# Express?

    I copied some code from a Mono 2.4 library to use in my own application.
    I'm getting a problem because one of the variable declarations involves the keyword "pinned" between the identifier and the instance name.
    Code:
    public override unsafe void PutBytes(byte[] dest, int destIdx, double value)
    {
        base.Check(dest, destIdx, 8);
        byte* pinned numPtr = $(dest[destIdx]);
        long* numPtr2 = (long*)
    ...
    See more | Go to post
Working...