本文实例讲述了C#使用Object类实现栈的方法。分享给大家供大家参考,具体如下:
Stack类的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace 使用Object类实现后进先出队列
{
class Stack
{
private Object[] _items;
public Object[] Items
{
get { return this._items; }
set { this._items = value