'2013/12/30'에 해당되는 글 5건

  1. 2013.12.30 c# delegate
  2. 2013.12.30 c# 책
  3. 2013.12.30 뒤로가기 버튼 클릭시 종료 팝업후 종료 하기
  4. 2013.12.30 c# 제네릭
  5. 2013.12.30 INSTALL_FAILED_INSUFFICIENT_STORAGE 오류시

c# delegate

|


// Declare delegate -- defines required signature:
delegate double MathAction(double num);

class DelegateTest
{
    // Regular method that matches signature:
    static double Double(double input)
    {
        return input * 2;
    }

    static void Main()
    {
        // Instantiate delegate with named method:
        MathAction ma = Double;

        // Invoke delegate ma:
        double multByTwo = ma(4.5);
        Console.WriteLine("multByTwo: {0}", multByTwo);

        // Instantiate delegate with anonymous method:
        MathAction ma2 = delegate(double input)
        {
            return input * input;
        };

        double square = ma2(5);
        Console.WriteLine("square: {0}", square);

        // Instantiate delegate with lambda expression
        MathAction ma3 = s => s * s * s;
        double cube = ma3(4.375);

        Console.WriteLine("cube: {0}", cube);
    }
    // Output:
    // multByTwo: 9
    // square: 25
    // cube: 83.740234375
}


Trackback 0 And Comment 0

c# 책

|

뇌를 자극하는 c# 


inside C# - 무료로 공개 

http://ohyecloudy.com/pnotes/archives/677

C# in Depth
http://ohyecloudy.com/pnotes/archives/689


뇌를 자극하는 C# 4.0 프로그래밍, 
이펙티브 C#, 
Head First C#,
C# and the .NET 4 Platform

'보고싶은책' 카테고리의 다른 글

c# 책  (0) 2014.01.06
Unity 3.x Game Development Essentials 한국어판 C#과 자바스크립트로 하는 유니티 3.x 게임 개발  (0) 2014.01.04
c# 책  (0) 2013.12.30
유니티 책  (0) 2013.12.11
유니티 서적  (0) 2013.12.11
유니티 중급 이상 책  (0) 2013.12.11
Trackback 0 And Comment 0

뒤로가기 버튼 클릭시 종료 팝업후 종료 하기

|
//add 131227 - 게임 종료시 팝업
private void exitGameDialog()
{
new AlertDialog.Builder(this.mActivity.get()) 
         .setIcon(android.R.drawable.ic_dialog_alert) 
         .setTitle("게임종료 팝업") // 제목부분 텍스트
         .setMessage("게임을 종료 하시겠습니까?") // 내용부분 텍스트
         .setPositiveButton("예",
         new DialogInterface.OnClickListener() 
         { 
             @Override 
             public void onClick( DialogInterface dialog, int which ) 
             { 
            //프로그램 종료
            android.os.Process.killProcess(android.os.Process.myPid());
             } 
         } 
         ).setNegativeButton("아니오", null ).show(); //취소버튼을 눌렀을때..
         
}


Trackback 0 And Comment 0

c# 제네릭

|

c++의 템플릿과 유사한 것

// Declare the generic class.
public class GenericList<T>
{
    void Add(T input) { }
}
class TestGenericList
{
    private class ExampleClass { }
    static void Main()
    {
        // Declare a list of type int.
        GenericList<int> list1 = new GenericList<int>();

        // Declare a list of type string.
        GenericList<string> list2 = new GenericList<string>();

        // Declare a list of type ExampleClass.
        GenericList<ExampleClass> list3 = new GenericList<ExampleClass>();
    }
}


Trackback 0 And Comment 0

INSTALL_FAILED_INSUFFICIENT_STORAGE 오류시

|

android:installLocation="preferExternal"

메모리 공간이 부족해서 나는 오류이므로

manifest 에 추가

Trackback 0 And Comment 0
prev | 1 | next