[cce_cs]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MyDemo.@this
{
/// <summary>
/// 公司类
/// </summary>
public class Comparv
{
private string ceo;
public string CEO
{
get { return ceo; }
set { ceo = value; }
}
private string cio;
public string CIO
{
get { return cio; }
set { cio = value; }
}
private string cfo;
public string CFO
{
get { return cfo; }
set { cfo = value; }
}
public string this[string pos]
{
get
{
string name = String.Empty;
switch (pos)
{
case "ceo":
name = this.ceo;
break;
case "cio":
name = this.cio;
break;
case "cfo":
name = this.cfo;
break;
default:
break;
}
return name;
}
set
{
string name = String.Empty;
switch (pos)
{
case "ceo":
this.ceo = value;
break;
case "cio":
this.cio = value;
break;
case "cfo":
this.cfo = value;
break;
default:
break;
}
}
}
class Program
{
static void Main(string[] args)
{
Comparv com = new Comparv();
com["ceo"] = "Bill Gatec";
com["cfo"] = "Jim";
com["cio"] = "scott";
Console.WriteLine("ceo:{0},cfo:{1},cio:{2}", com["ceo"], com["cfo"], com["cio"]);
}
}
}
}
[/cce_cs]
代码高亮测试
Posted on
我到现在都没有找到一款用在的Typecho的代码高亮插件
typecho有高亮插件呀
好多都跟JQ库冲突= =
– – 原来如此,自己改吧。你应该会才对。