Skip to content

Instantly share code, notes, and snippets.

@hitendradeveloper
Last active May 15, 2018 17:36
Show Gist options
  • Save hitendradeveloper/92512ba902bb5bef60967cb316a0c643 to your computer and use it in GitHub Desktop.
Save hitendradeveloper/92512ba902bb5bef60967cb316a0c643 to your computer and use it in GitHub Desktop.
type-casting simple example 1
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
@hitendradeveloper
Copy link
Author

This is just a simple type-casting example1 for the medium blog - https://medium.com/@hitendra.hckr/protocol-the-power-of-swift-5dfe9bc41a99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment