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. passing a function name as a paramter

passing a function name as a paramter

Scheduled Pinned Locked Moved C#
questionhelp
3 Posts 2 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.
  • N Offline
    N Offline
    njaromack
    wrote on last edited by
    #1

    Hi all, I am trying to pass a function name as a parameter and use it to create an OracleDataReader: private void DataHandler(string type, string function) { AuthViewsLookup myLookup = new AuthViewsLookup(m_AppParam); OracleDataReader rdr = myLookup.function; while(rdr.Read()) { //do stuff } rdr.Close(); } setting the reader to myLookup.function does not work, b/c it wants the actual function name. How can I make this work? Thanks for any help.

    S 1 Reply Last reply
    0
    • N njaromack

      Hi all, I am trying to pass a function name as a parameter and use it to create an OracleDataReader: private void DataHandler(string type, string function) { AuthViewsLookup myLookup = new AuthViewsLookup(m_AppParam); OracleDataReader rdr = myLookup.function; while(rdr.Read()) { //do stuff } rdr.Close(); } setting the reader to myLookup.function does not work, b/c it wants the actual function name. How can I make this work? Thanks for any help.

      S Offline
      S Offline
      S Sansanwal
      wrote on last edited by
      #2

      Refer http://www.codeproject.com/dotnet/MethodName.asp[^] Sanjay Sansanwal www.sansanwal.com

      N 1 Reply Last reply
      0
      • S S Sansanwal

        Refer http://www.codeproject.com/dotnet/MethodName.asp[^] Sanjay Sansanwal www.sansanwal.com

        N Offline
        N Offline
        njaromack
        wrote on last edited by
        #3

        That's not exactly what I meant. I want to tell it what function to go to by passing in the function's name.

        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