title: How to get names and values of method's parameters?
body: <p>Is there possibility to get names of method's parameters inside method code? Can anyone show example of it?</p>
  
  <p>I found only this solution at this time, but dislike it..:</p>
  
  <pre><code>class Greeter() {
  
      fun greet(name: String) {
          val c = Greeter::class;
          for (m in c.memberFunctions) {
              if (m.name == "greet") {
                  val p = m.parameters
                  println(p.toString())
              }
          }
          println("Hello, ${name}");
      }
  }
  
  fun main(args: Array&lt;String&gt;) {
      Greeter().greet("UserName")
  }
  </code></pre>
  
  <p>update: i found another solution, but now i have one more question:
  How to get pairs of ParamName, ParamValue at function greet? </p>
  
  <pre><code>class Greeter() {
  
      fun greet(name: String) {
          val p = Greeter::greet.parameters
          println(p.toString())
          println("Hello, ${name}");
      }
  }
  
  fun main(args: Array&lt;String&gt;) {
      Greeter().greet("UserName")
  }
  </code></pre>