public void VersionEdit(IFeatureWorkspace featureWorkspace)
{
IFeatureClass featureClass = featureWorkspace.OpenFeatureClass("Feature_Class_Name");
IVersion2 version = (IVersion2)featureWorkspace;
//IVersionedWorkspace versionedWorkspace = (IVersionedWorkspace)version;
IVersionEdit4 versionEdit = (IVersionEdit4)version;
//reconcile against the default version
if(version.HasParent() != false)
{
Boolean conflictsDetected = versionEdit.Reconcile4("SDE.DEFAULT", true, false, false, false);
IVersion preReconcileVersion = versionEdit.PreReconcileVersion;
IVersion commonAncestorVersion = versionEdit.CommonAncestorVersion;
IVersion reconcileVersion = versionEdit.ReconcileVersion;
IVersion startEditingVersion = versionEdit.StartEditingVersion;
//no conflicts detected so post can be performed
if (conflictsDetected != true && versionEdit.CanPost())
{
versionEdit.Post("SDE.DEFAULT");
}
}
}