A protected member of a base class is accessible in a derived class only if the access takes place through the derived class type.
You are getting error because because A is not derived from B.
http://msdn.microsoft.com/en-us/library/bcd5672a(v=vs.90).aspx