DEV Community

Max Smirnov
Max Smirnov

Posted on

Pocket Kotlin-C# Dictionary. D

D

Kotlin C#
data
Data class is a class designed to hold data, it has some automatically created methods like value-based equals() and so on Learn more. Data object a singleton with few automatically created methods Learn more
record, which is a synonym for record class, is an equivalent to Kotlin data class. C# doesn't have built-in support for singletons, so the nearest equivalent to the data object is an explicitly coded singleton of record class Learn more
@delegate
Annotation target that specifies that annotation is related to delegate automatically created by by Learn more
C# does not have built-in language support for delegation pattern. One can code pattern classes manually and set annotating attributes everywhere he wants
do
Do-while loop (loop with postcondition) Learn more
do
Do-while loop (loop with postcondition) Learn more
dynamic
Turns-off type-checker to to interoperate with untyped or loosely typed environments, such as the JavaScript ecosystem. Not supported in code targeting the JVM Learn more
No such thing. C# code is always statically-typed (types are checked by compiler)

Top comments (0)