Export (0) Print
Expand All

AffinityInfo.Parent Property

This gets the parent object of the AffinityInfo object. This value is the same as the Server object that contains the AffinityInfo member.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public Server Parent { get; }

Property Value

Type: Microsoft.SqlServer.Management.Smo.Server
The parent Server object that contains the AffinityInfo object. If a parent does not exist then null is returned.

Access to the AffinityInfo object is provided though the Server object.

This example displays the name of the Instance of SQL Server for the parent of the AffinityInfo member of the

Server object

using System;
using Microsoft.SqlServer.Management.Smo;

namespace samples
    class Program
        static void Main(string[] args)
            Server dbServer = new Server("(local)");


            Console.WriteLine("Server Name: {0}\n" +
                              "AffinityInfo.Parent: {1}",


#Create the server. 
$dbServer = new-Object Microsoft.SqlServer.Smo.Server("(local)")

Write-Host "Server Name:" $dbServer.Name`n AffinityInfo.Parent: 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft