Created
May 11, 2020 20:50
-
-
Save sandeeplearner/5e7e5e6d20e78e49a4180c909e86b8fa to your computer and use it in GitHub Desktop.
ViewController confirming to protocol
This file contains hidden or 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
class ViewController: UIViewController,GenericOperations { | |
typealias Operand = Int | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let a = 100 | |
let b = 200 | |
debugPrint(self.add(operand1: a, operand2: b)) | |
} | |
} | |
class ViewControllerV2: UIViewController,GenericOperations { | |
typealias Operand = String | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let a = "Sandeep" | |
let b = "Bhandari" | |
debugPrint(self.add(operand1: a, operand2: b)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment