Get Value

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Walter

    Get Value

    Hi

    i have the following source in VB.NET

    txtKSRServer.Te xt = m_SetupData.Cus tomProperties["Servername "].Value

    ' (SetupData = interface)

    how can i read the value from ["Servername "] in C#

    i tried it with this

    this.txtKSRServ er.Text = (string)
    m_SetupData.Cus tomProperties.G etType().Invoke Member("Servern ame",
    BindingFlags.De fault | BindingFlags.Ge tProperty, null, m_SetupData, new
    object [] {});

    but i always get en exception. :o(

    Could someone help me

    Many thanks

    Walter



  • Richard A. Lowe

    #2
    Re: Get Value

    Can you provide a short, complete example that shows this problem? IE:


    Posting compilable code helps us to help you.
    Richard

    --
    C#, .NET and Complex Adaptive Systems:

    "Walter" <wde@value-management.ch> wrote in message
    news:O2CPdPivDH A.2712@TK2MSFTN GP11.phx.gbl...[color=blue]
    > Hi
    >
    > i have the following source in VB.NET
    >
    > txtKSRServer.Te xt = m_SetupData.Cus tomProperties["Servername "].Value
    >
    > ' (SetupData = interface)
    >
    > how can i read the value from ["Servername "] in C#
    >
    > i tried it with this
    >
    > this.txtKSRServ er.Text = (string)
    > m_SetupData.Cus tomProperties.G etType().Invoke Member("Servern ame",
    > BindingFlags.De fault | BindingFlags.Ge tProperty, null, m_SetupData, new
    > object [] {});
    >
    > but i always get en exception. :o(
    >
    > Could someone help me
    >
    > Many thanks
    >
    > Walter
    >
    >
    >[/color]


    Comment

    Working...