PIXNET Logo登入

幻想魚的幻想空間

跳到主文

O.O 隨手寫寫

部落格全站分類:生活綜合

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 6月 14 週四 201218:29
  • [C#] 實現Singleton的方法比較

回家在看~
 
http://big5.webasp.net/article/15/14889.htm
http://msdn.microsoft.com/en-us/library/ff650316.aspx
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(30)

  • 個人分類:C# 技術文章
▲top
  • 6月 12 週二 201215:57
  • [C#] "Where" of LINQ (three methods)

// Main function
class MainFunc
{
static void Main(string[] args)
{
string[] animals = new string[] { "Koala", "Spider", "Elephant" };
wherepractice prac = new wherepractice();
// get animals of StartName is "S"
prac.detailWhere(animals);
// get amimals of StartName is "E"
prac.lambdaWhere(animals);
// as above result, but different implement.
prac.delegateImpleWhere(animals);
Console.ReadLine();
return;
}
}
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(20)

  • 個人分類:C# 技術文章
▲top
  • 6月 12 週二 201200:27
  • [ASP.NET] Asp.net datasource 綁定資料實作

http://www.csharpwin.net/ddwstp/net/csharp/5723dr4312.shtml
簡單明瞭不囉嗦。這段威威..~"~ 
 
=====重點整理一下關於綁定自己設定的DataType方法====
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(30)

  • 個人分類:ASP.NET 經驗分享
▲top
  • 4月 15 週日 201216:38
  • [C#] "Where" of LINQ (three methods)

// Main function
class MainFunc
{
static void Main(string[] args)
{
string[] animals = new string[] { "Koala", "Spider", "Elephant" };
wherepractice prac = new wherepractice();
// get animals of StartName is "S"
prac.detailWhere(animals);
// get amimals of StartName is "E"
prac.lambdaWhere(animals);
// as above result, but different implement.
prac.delegateImpleWhere(animals);
Console.ReadLine();
return;
}
}
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(4)

  • 個人分類:C# 技術文章
▲top
  • 4月 15 週日 201216:30
  • [C#] goto statement

This is a simple sample for Exit statement.
static void Main(string[] args)
{
Program.correctGoto();
Program.GotoInfiniteLoop();
Program.falseGoto();
}

//This is a correct Goto statement method.
static public void correctGoto()
{
for (int i = 0; i < 100; i++)
{
Console.WriteLine("{0}", i);
if (i == 5)
{
goto Exit;
}
}
Exit: Console.WriteLine("Exit");
}

//If you put Exit tag before goto statement, it will cause infinite loop.p>
static public void GotoInfiniteLoop()
{
Exit: Console.WriteLine("Exit");

for (int i = 0; i < 100; i++)
{
Console.WriteLine("{0}", i);
if (i == 7)
{
goto Exit;
}
}

}

//It's a wrong method to use exit statement.
static public void falseGoto()
{
for (int i = 0; i < 100; i++)
{
Console.WriteLine("{0}", i);
if (i == 7)
{
Exit: Console.WriteLine("Exit");
}
// this method can't jump from external into internal.
goto Exit;
}
}
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(23)

  • 個人分類:C# 技術文章
▲top
  • 4月 12 週四 201214:09
  • [C#] "Where" of LINQ (three methods)

// Main function
class MainFunc
{
static void Main(string[] args)
{
string[] animals = new string[] { "Koala", "Spider", "Elephant" };
wherepractice prac = new wherepractice();
// get animals of StartName is "S"
prac.detailWhere(animals);
// get amimals of StartName is "E"
prac.lambdaWhere(animals);
// as above result, but different implement.
prac.delegateImpleWhere(animals);
Console.ReadLine();
return;
}
}
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(0)

  • 個人分類:C# 技術文章
▲top
  • 4月 10 週二 201220:14
  • [C#] List Initialization between 2.0 and 3.0

class ListInit
{
static void Main(string[] args)
{
// The demo of List Initialize Set including old declaration and new declaration(C#3.0)
// Old initialization.
List stringOld = new List();
stringOld.Add("string_1");
stringOld.Add("string_2");

// New initialization.
List stringNew = new List()
{
"string_1",
"string_2"
};

// Combine Object and List Init.
List list = new List{
new Contact{
LastName = "Alen",
DateOfBirth = new DateTime(1234,1,13)
},
new Contact{
LastName = "AlenTwo",
DateOfBirth = new DateTime(2345,1,23)
}
};
}

private class Contact
{
public string LastName { get; set; }
public DateTime DateOfBirth { get; set; }
}
}
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(22)

  • 個人分類:C# 技術文章
▲top
  • 4月 06 週五 201213:40
  • [C#] Object Initialization between 2.0 and 3.0

class Program
{
static void Main(string[] args)
{
// The demo of Object Initialize Set including old declaration and new declaration(C#3.0)

// If member access modifier isn't declared as "public", method_1 and method_2 isn't working.
// method_1
Contact contact = new Contact();
contact.LastName = "A-len";
contact.DateOfBirth = new DateTime(2012, 04, 03);

//method_2
Contact contactNew = new Contact
{
LastName = "A-len",
DateOfBirth = new DateTime(2012, 04, 03)
};
}

private class Contact
{
public string LastName { get; set; }
public DateTime DateOfBirth { get; set; }
}
}
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(24)

  • 個人分類:C# 技術文章
▲top
  • 2月 25 週六 201223:08
  • 10.08 首爾行 Hayri art village

IMG_0012.JPG阿好像很久沒寫了...(搔頭)。從韓國回來以後中間經歷了短暫的軍事訓練以後就投入到Gamania的大家庭了...,然後就忙到忘記把最後兩天的部份給補齊 = =++
。趁這個228連假的空檔,機會一鼓作氣地寫完吧!!!




  
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(77)

  • 個人分類:旅遊
▲top
  • 1月 19 週四 201200:19
  • [C#]How to adjust the encoding in StreamReader

StreamReader defaults to UTF-8 encoding unless specified otherwise, instead
of defaulting to the ANSI code page for the current system.
(Hint: Convert xls/xlsx file to csv file. the encoding is ANSI.)
(繼續閱讀...)
文章標籤

imagefish 發表在 痞客邦 留言(0) 人氣(87)

  • 個人分類:C# 技術文章
▲top
«1234...8»

個人頭像

imagefish
暱稱:
imagefish
分類:
生活綜合
好友:
累積中
地區:

近期文章

  • [C#] HTML Agility Pack 相關
  • [C#] Convert Json to C# DataStruct by JSON.NET library
  • [NoSQL] 安裝時卡點的問題。
  • [NoSQL] Hadoop on Ubuntu
  • C# 與 ReportingService2005 互動的方法
  • [C#] C# 讀取 Excel file 相關資料
  • [NoSQL] The Introduction of Hadoop
  • [DB] Collation設定:Case Sensitive && Case Insensitive
  • [ASP.NET] 利用VSPerfMon做出 Code coverage的報告(上) (實測ASP.NET可用)
  • 杰倫與女貴族

文章彙整

文章分類

  • NoSQL (3)
  • Relation-DB (1)
  • ASP.NET 經驗分享 (9)
  • C# 技術文章 (22)
  • 旅遊 (9)
  • 英文 (1)
  • 樂曲創作&&音樂欣賞 (3)
  • 棒球相關 (10)
  • 科技討論 (6)
  • 碎碎念 (11)
  • 未分類文章 (1)

部落格文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣: