What are the differences when i unwrap Optional value by ?
and !
If there is Class name A and there is a property name proA
Then if i make an instance like this
var a:A? = A()
a?.proA
a!.proA
I can approach property 'proA' two ways above. I know I cannot get value if I use a.proA
because a
is a Optional Type.
Also, I know a!.proA
can get value because it unwrap the value in force
And what is a?.proA
?
What are the differences between a?.proA
and a!.proA