Clonable object
TestApp\Program.vb
' Copyright 2012 ESRI
' 
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
' 
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
' 
' See the use restrictions.
' 

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports ESRI.ArcGIS.esriSystem

Friend Class Program
 Private Shared m_AOLicenseInitializer As LicenseInitializer = New LicenseInitializer()

  <STAThread()> _
  Shared Sub Main(ByVal args As String())
  'ESRI License Initializer generated code.
  m_AOLicenseInitializer.InitializeApplication(New esriLicenseProductCode() {esriLicenseProductCode.esriLicenseProductCodeEngine}, New esriLicenseExtensionCode() {})

  Console.WriteLine("Creating container object")
  'create a new instance of the test object which will internally clone our clonable object
  Dim t As TestClass = New TestClass()
  t.Test()

  Console.WriteLine("Done, hit any key to continue.")
  Console.ReadKey()

  'ESRI License Initializer generated code.
  'Do not make any call to ArcObjects after ShutDownApplication()
  m_AOLicenseInitializer.ShutdownApplication()
 End Sub
End Class