C
Kotlin | C# |
---|---|
catch Catches exception |
catch Catches exception |
class Class declaration |
class Class declaration |
companion object, that is accessible without instantiating a class and Companion, its default name Learn more | Replacement for static properties and methods of a class. Differences are numerous! Learn more |
const Compile-time constant Learn more |
const Compile-time constant Learn more |
constructor Constructor. Can be omitted |
C# constructor syntax doesn't use a designated keyword |
continue A statement to continue a loop Learn more |
continue A statement to continue a loop. Unlike C#, Kotlin has continue@myLabel syntax to continue any level of nested loops. C# doesn't need it because it has goto statement! Hell yeah! Learn more |
crossinline Modifier that indicates that lambda parameter of an inline function cannot use non-local returns |
In C# there are no non-local returns (lambda cannot execute return from outer method, only from itself), so, technically every method is "crossinline" |
Top comments (0)