// get the type based on user selection Type selectedType = Type.GetType("Namespace.ClassName"); // create an instance of the selected type object instance = Activator.CreateInstance(selectedType);In the above code, the `Type.GetType()` method is used to retrieve the `Type` object for the selected class, and `Activator.CreateInstance()` is used to create an instance of that class. Another example of using the Activator class is in a scenario where a factory method needs to create objects based on dynamic inputs. The factory method can use the Activator class to create instances of the requested types. The Activator class is part of the System namespace in .NET Framework, and the System.Runtime.InteropServices.WindowsRuntime namespace in .NET Core.