Last active
May 15, 2018 17:36
-
-
Save hitendradeveloper/92512ba902bb5bef60967cb316a0c643 to your computer and use it in GitHub Desktop.
type-casting simple example 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var intValue: Int = 5 | |
var doubleValue: Double = 7.0 | |
var addition = Double(intValue) + doubleValue //addition will be implicitly considered of type Double by swift compiler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is just a simple type-casting example1 for the medium blog - https://medium.com/@hitendra.hckr/protocol-the-power-of-swift-5dfe9bc41a99