zoukankan      html  css  js  c++  java
  • 读取/保存xml文件的类(序列化/反序列化)

      1
      2using System;
      3using System.Collections.Generic;
      4using System.Text;
      5using System.Xml.Serialization;
      6using System.IO;
      7using System.Reflection;
      8
      9namespace Mobile.Services
     10{
     11    /// <summary>
     12    /// 读取/保存xml文件的类
     13    /// </summary>

     14    public class XmlService
     15    {
     16        private string _strPath;
     17
     18        public XmlService()
     19        {
     20            //this._strPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase + "\\SysSetting.xml");
     21        }

     22
     23
     24        /// <summary>
     25        /// 持久化文件路径
     26        /// </summary>

     27        public string XMLPath
     28        {
     29            get return _strPath; }
     30            set { _strPath = value; }
     31        }

     32
     33        公有方法/属性
    112
    113    }

    114}

    115
    为成功找方法,不为失败找借口!
  • 相关阅读:
    堪称为经典游戏设计帖整理20个点击回复超高的精品贴
    【专题报道】Google I/O开发者大会
    android用户界面之AlarmManager教程实例汇
    Android2.2 API 中文文档系列
    ruby设计模式之【观察者】模式2————更加一般化的观察者模式
    ruby中require和load的区别
    ruby/python/java全覆盖的SeleniumWebdriver系列教程(1)————快速开始
    ruby + nokogiri实现将天涯易读全帖转换成txt文件的功能
    WatirWebdriver与watir1.x的差异
    Notepad++ 的一些常用快捷键
  • 原文地址:https://www.cnblogs.com/wt0731/p/852442.html
Copyright © 2011-2022 走看看