⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shoppingitem.cs

📁 XmlSerialization this is only an example of how to use the XmlSerialization library in .net
💻 CS
字号:
using System.Xml.Serialization;

namespace XmlSerialization
{
    public class ShoppingItem
    {
        private string name;
        private double price;

        public ShoppingItem()
        {
        }

        public ShoppingItem(string name, double price)
        {
            this.name = name;
            this.price = price;
        }

        [XmlAttribute("name")]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }

        [XmlAttribute("price")]
        public double Price
        {
            get
            {
                return price;
            }
            set
            {
                price = value;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -