How specifically to generate table creation script using c# and smo or other method
===

When I'm in SQL server and I want to generate a script to create a table, I do the following:

1. Right click table
2. Select "Script Table As"
3. Select "CREATE To"
4. Select "New Query Editor Window"

How specifically do I get this same result in C# using SMO or some other method?

