What does mean to instantiate a class object during this same class initialization?

I'm looking at some code that a new class has a line of code instantiating it during its deiniting.  What's the purpose of this?  Is this the class contructor now?  Why does have that named as ParentInterest?  It usually just the same name as the class, isn't it?  I'm confused here.
Thanks.

    public class IInterest
    {
        public Interest ParentInterest { get; set; }
        public long Id { get; set; }
        public string Name { get; set; }
    }
lapuccaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PlatoConsultantCommented:
 public class IInterest
    {
        public Interest ParentInterest { get; set; }
        public long Id { get; set; }
        public string Name { get; set; }
    }

Interest  and IInterest are seperate classes normally IInterst is used for intereface...

here but if both of them are same classes then the self referential relationship exisits between the two classes that a class contains a refrence to it self...


for example person is a class but person has parents and childs but all of them are persons also hence persons is store refrence to parents and childs which are the same class person...
 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lapuccaAuthor Commented:
Yes, they're both the same class.  I just had a type there.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.