is this only a syntactic difference? ```sealed cl...
# getting-started
h
is this only a syntactic difference?
Copy code
sealed class Foo {
    object Bar : Foo()
}
vs
Copy code
sealed class Foo

object Bar : Foo()
standard class syntax would imply
Bar
has its own
Bar
object in the first one
a
I think the only difference is from the caller. The first one would be accessed as
Foo.Bar
while the second would just be
Bar
but both enforce the sealed nature of the contents. The first seals within the brackets and the second - within the file
h
Right