Once you are connected to SQL Server 2005 with a SMO connection, you can start manage and create object. Here is an example on how you can create a table with a promary key (this sample is written in C# and use a beta version of SQL Server 2005 and of the .Net Framework 2.0).
The Object sqlserver, is the object created after the connection in this post about smo connection
Of course, In order to connect to SQL Server using SMO you have to reference the following namespace (and the corresponding assembly):
And the code to create the table is :
idx.IndexKeyType = IndexKeyType.DriPrimaryKey;