DEV Community

Max Smirnov
Max Smirnov

Posted on

Pocket Kotlin-C# Dictionary. F

F

Kotlin C#
false false
@field
Annotation target, used to annotate automatically created fields (e.g. when you have a primary constructor, the compiler automatically creates a field, its getter, its setter and so on, an you want to annotate specifically a field) Learn more
New versions of C# have primary constructors, so there can be a property that is not coded expicitly in the code, but as of 2023 I haven't found a way to attach an attribute to such property See en example of unresolved question
@file Annotation target, used to annotate source file Learn more In .Net one cannot target attribute on a source file Learn more
final
Modifier that forbids overriding of members Learn more
sealed
Modifier that forbids overriding of classes and members. In Kotlin classes are final by default, one has to use modifier open to allow inheritance from a class Learn more
finally finally
for
Iterates through anything that implements Iterable<> interface Learn more
foreach
Iterates through anything that implements IEnumerable<> interface Learn more
fun
Function declaration
C# method declaration doesn't use a designated keyword

Top comments (0)