class Base
{
public:
int base_int;
};
class Derived : public Base
{
public:
int derived_int;
};
Base* basepointer = new Derived();
basepointer-> //Access derived_int here,
我有三個班;實現接口IProduct的郵票,信件和包裹,他們也有自己的一些功能。 public interface IProduct
{
string Name { get; }
int Quantity { get; set; }
float Amount { get; }
}
public class Stamp : IProduct
{
pu
using System.ComponentModel;
using System.IO;
using System.Xml.Serialization;
namespace SerializerTest {
static class Program {
static void Main() {
using (TextWriter textWriter