How to prevent the class from being inherited in C#?

How can one prevent the class from being inherited by another class using c#?

It’s simple, mark the class as “sealed”.

How to prevent the class from being inherited in C#?

sealed public class BaseClass

{

public string MovieName { get; set; }

}