title: how to get type of a variable in swift
body: <p>Every variable in swift has a type.</p>
  
  <p><strong>var c: Int = 0 // type is Int</strong></p>
  
  <p><strong>var d: (Int,(String,Double)) // type is (Int,(String,Double))</strong></p>
  
  <p>how can I get type of a variable. See example below. </p>
  
  <pre><code>func retSomeThing ()-&gt; ((Int,(String,b: Int))){
      return(10,("something",b: 56))
  }
  
  var a = retSomeThing()
  var b = retSomeThing()
  if (a.type.equal(b.type)) { // my problem is here.
      print("Hala Madrid")
  }
  </code></pre>
  
  <p>I used this code</p>
  
  <pre><code>a.dynamicType
  </code></pre>
  
  <p>But it has shown : value of tuple type '(Int, (String, b: Int))' has no member 'dynamicType'</p>