using System;
using System.Collections;
using System.Collections.Generic;
namespace DPExample
{
public class Resume : ICloneable
{
private string name;
private string sex;
private string age;
private WorkExperience work;
public Resume(string name)
{
this.name = name;
this.work = new WorkExperience();
}
public Resume (WorkExperience work)
{
this.work = (WorkExperience)work.Clone();
}
public void SetPersonalProfile(string sex, string age)
{
this.sex = sex;
this.age = age;
}
public void SetWorkExperience(string timeArea, string company)
{
work.Time = timeArea;
work.Company = company;
}
public void Display()
{
Console.WriteLine ("{0} {1} {2}", name, sex,age );
Console.WriteLine ("Work Experience: {0} {1}", work.Time, work.Company);
}
public Object Clone()
{
Resume obj = new Resume(this.work);
obj.name = this.name;
obj.sex = this.sex;
obj.age = this.age;
return obj;
}
}
public class WorkExperience : ICloneable
{
private string time;
private string company;
public string Time { get { return time; } set { time = value; }}
public string Company { get { return company; } set { company = value; } }
public Object Clone()
{
return (Object)this.MemberwiseClone();
}
}
}
原文網址: http://www.cnblogs.com/haibindev/archive/2011/12/21/2296173.html 原文作者: haibindev 原文標題:c#万能视频播放器 本文的重點在於修正 class VlcPlayer,使其能順利在 VC# Express 2010 .Net Framework 4 下順利編譯。 修正重點在於 CallingConvention = CallingConvention. StdCall 改成 CallingConvention = CallingConvention. Cdecl using System; using System.Runtime.InteropServices; using System.Security; using System.Text; namespace VlcDotNet { class VlcPlayer { private IntPtr libvlc_instance_; private IntPtr libvlc_media_player_; private double duration_; public VlcPlayer(string pluginPath) { string plugin_arg = "--plugin-path=" + pluginPath; string[] arguments = { "-I", "dummy", "--ignore-config", "--no-video-title", plugin_arg }; libvlc_instance_ = LibVlcAPI.libvlc_new(arguments); libvlc_media_player_ = LibVlcAPI.libvlc_media_player_new(libvlc_instance_); } public ...

留言
張貼留言