0

I was hoping someone can assist with a thorough explanation on the syntax below in row 3. I was trying to search for it but couldn't get something that explains it for me nicely.

I am looking to understand not just this specific syntax but the generalized theory behind it, so that if I see something similar in the future I will be able to tell what is what.

1 using System;
2
3 public class TestClass : MarshalByRefObject{}
Cody Gray
  • 230,875
  • 49
  • 477
  • 553
CodeMantis
  • 45
  • 5

1 Answers1

1

As @BlackBear said and empty class inheriting "MarshalByRefObject" this formatting might give a clearer look:

using System;
public class TestClass : MarshalByRefObject
{
     //No implementation
}
Tamim Al Manaseer
  • 3,374
  • 3
  • 22
  • 33
  • Am I correct to state then, when you use inheritance you effectively merge two classes into one, allowing you to use both the properties of TestClass and MarshalByRefObject in TestClass? I understand there are subtleties involved that I might not fully understand yet, but from a high level view. http://msdn.microsoft.com/en-us/library/ms173149(VS.80).aspx – CodeMantis May 10 '14 at 11:57
  • In the most simplistic sense, yes. a child class will receive all the public and protected members of the parent. from a semantic perspective its a way of defining a more specialized version of the parent class, like a School is a more specialized version of a "LearningInstitution" or a Car is a Vehicle. – Tamim Al Manaseer May 10 '14 at 14:45