Question: Which code snippet declares an anonymous type named userData?

  1. `var<T> userData = new <T> { name = "John", age = 32 };`
  2. `var userData = new { name = "John", age = 32 };`
  3. `AType userData = new AType { name = "John", age = 32 };`
  4. `Anonymous userData = new Anonymous { name = "John", age = 32 };`

Answer: The correct answer of the above question is Option B:`var userData = new { name = "John", age = 32 };`