Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. reflexon

reflexon

Scheduled Pinned Locked Moved C#
helpquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vatzcar
    wrote on last edited by
    #1

    hi, i'm having error "Member not found." from the following code(in time of invoking member).. foreach (MemberInfo mi in type.GetMember("test_mdi_Init")) { type.InvokeMember (mi.Name.ToString(), BindingFlags.Default | BindingFlags.InvokeMethod, null, ibaseObject, arguments); } what could be the problem? thanx for help :)

    G M 2 Replies Last reply
    0
    • V vatzcar

      hi, i'm having error "Member not found." from the following code(in time of invoking member).. foreach (MemberInfo mi in type.GetMember("test_mdi_Init")) { type.InvokeMember (mi.Name.ToString(), BindingFlags.Default | BindingFlags.InvokeMethod, null, ibaseObject, arguments); } what could be the problem? thanx for help :)

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      The flags of the member doesn't fit the flags that you have specified. --- b { font-weight: normal; }

      V 1 Reply Last reply
      0
      • G Guffa

        The flags of the member doesn't fit the flags that you have specified. --- b { font-weight: normal; }

        V Offline
        V Offline
        vatzcar
        wrote on last edited by
        #3

        the member "test_mdi_Init" is a public method. also if use 'BindingFlags.Public' it throws an exception "Attemp to access a missing member". so what do you suggest?

        1 Reply Last reply
        0
        • V vatzcar

          hi, i'm having error "Member not found." from the following code(in time of invoking member).. foreach (MemberInfo mi in type.GetMember("test_mdi_Init")) { type.InvokeMember (mi.Name.ToString(), BindingFlags.Default | BindingFlags.InvokeMethod, null, ibaseObject, arguments); } what could be the problem? thanx for help :)

          M Offline
          M Offline
          Marc 0
          wrote on last edited by
          #4

          BindingFlags.Default is 0, so you can remove that. I think you need BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance.


          "..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.." -- Mark McCormick


          || Fold With Us! || Pensieve || VG.Net ||

          V 2 Replies Last reply
          0
          • M Marc 0

            BindingFlags.Default is 0, so you can remove that. I think you need BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance.


            "..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.." -- Mark McCormick


            || Fold With Us! || Pensieve || VG.Net ||

            V Offline
            V Offline
            vatzcar
            wrote on last edited by
            #5

            thank you for your reply. BindingFlags.InvokeMethod works fine. i didn't make my method 'ststic', that's why i was having exception. Sorry, my mistake :(

            1 Reply Last reply
            0
            • M Marc 0

              BindingFlags.Default is 0, so you can remove that. I think you need BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance.


              "..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.." -- Mark McCormick


              || Fold With Us! || Pensieve || VG.Net ||

              V Offline
              V Offline
              vatzcar
              wrote on last edited by
              #6

              thank you for your reply. BindingFlags.InvokeMethod works fine. i didn't make my method 'static', that's why i was having exception. Sorry, my mistake :(

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups