초기 커밋.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
||||
public class MyConnection : Component, IDbConnection, IDisposable
|
||||
{
|
||||
// IDbConnection을 구현
|
||||
// IDisposable을 구현
|
||||
}
|
||||
|
||||
internal class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello, World!");
|
||||
}
|
||||
}
|
||||
|
||||
public interface IComparable
|
||||
{
|
||||
// 멤버 앞에 접근제한자 사용 안함
|
||||
int CompareTo(object obj);
|
||||
}
|
||||
|
||||
public class MyClass : IComparable
|
||||
{
|
||||
private int key;
|
||||
private int value;
|
||||
|
||||
// IComparable 의 CompareTo 메서드 구현
|
||||
public int CompareTo(object obj)
|
||||
{
|
||||
MyClass target = (MyClass)obj;
|
||||
return this.key.CompareTo(target.key);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user