In Vb.Net I would do it in this way
Dim p As New Person()
p.Name = ""
someFunc(p)
'OR
Dim p As New Person()
With p
.Name = ""
End With
someFunc(p)
'OR
someFunc(New Person() With {.Name = ""})
Now how to do the last in Kotlin?
In Vb.Net I would do it in this way
Dim p As New Person()
p.Name = ""
someFunc(p)
'OR
Dim p As New Person()
With p
.Name = ""
End With
someFunc(p)
'OR
someFunc(New Person() With {.Name = ""})
Now how to do the last in Kotlin?
The last one, in kotlin, is just:
someFunc(Person().apply { name = "" })