using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace 多态模拟移动硬盘和U盘 { class Program { static void Main(string[] args) { //用多态来实现U盘,Mp3,移动硬盘和电脑的对接,读取写入数据. MobileTool mt = new UDisk(
1:通过Application传递数据 假如有一个Activity A, 跳转到 Activity B ,并需要推荐一些数据,通常的作法是Intent.putExtra() 让Intent携带,或者有一个Bundle把信息加入Bundle让Intent推荐Bundle对象,实现传递.但这样作有一个问题在 于,Intent和Bundle所能携带的数据类型都是一些基本的数据类型,如果想实现复杂的数据传递就比较麻烦了,通常需要实现 Serializable或者Parcellable接口.这其实是And