April 19, 2010
@ 09:45 AM
Last week someone asked me about "yield" that he saw in my blog. It is very embarrassed me, I totally forget what it is.
I can't keep the "yield" in my mind because it is not something like "what you see is what it is". it even didn't has "return" in the code scope, that make code not easy to read.  that new feature of c#3.0 need me more time to familiar with.


But the new feature "Default Parameter" in c# 4.0 give me some different feeling ,
This is something very nature and  very easy to use.

private void TestFunction(string username,bool isAdmin=false)
{
    //do something..
}

/// since have Default Parameter, this overLoad function is no more need
//private void TestFunction(string username)
//{
//    TestFunction(username,false);
//}
public void Test()
{
     TestFunction("user");
     TestFunction("user1",true)

 
}


This will make you code cleaner and easier to read in many cases.


 
Friday, 19 August 2011 04:27:51 (Eastern Daylight Time, UTC-04:00)
for bentley watches tag heuer watches fake tag heuer watches enthusiastic oris watches fake watches iron is hot replica breitling watches for sale replica breitling watches for sale linens fake cartier watches replica cartier watches every tide omega replica omega replica watches rolex reminded watches rolex vacheron constantin.
Friday, 19 August 2011 04:48:42 (Eastern Daylight Time, UTC-04:00)
audemars piguet watches breitling fake breitling watches eye replica cartier watches cartier tissot watches replica omega watches for sale replica omega dare submariner watches fake rolex fake rolex fake patek philippe watches tag heuer watches watches tag heuer abigayle watches replica designer watches.
Friday, 06 January 2012 19:26:32 (Eastern Standard Time, UTC-05:00)
discount designer watches watches replica tag watch tag heuer watches eyeglasses cartier fake cartier lv watches.
Monday, 27 February 2012 22:14:20 (Eastern Standard Time, UTC-05:00)
silver watches replica watch best mens watches fake rolex rolex price, fake cartier watches watch cartier.
Tuesday, 28 February 2012 00:14:32 (Eastern Standard Time, UTC-05:00)
Suits direct Herve Leger Casual Dresses Vintage clothing BCBG Shorts Retro vintage Prom Dress Vintage t shirts BCBG Party Dresses Free dresses Herve Leger Jeans Cocktail dresses.
Monday, 05 March 2012 20:20:13 (Eastern Standard Time, UTC-05:00)
designer watches replica watches for sale gold watch fake rolex watches rolex 16610, movado replica replica movado watches.
Wednesday, 07 March 2012 05:19:45 (Eastern Standard Time, UTC-05:00)
10 years gucci wallets for sale (i.e. 2001 and before cheap gucci admission) gucci business bags gucci business but did not graduate PhD students discount gucci wallets reach 253 people.The cheap gucci wallets entrance has been 15.
Wednesday, 07 March 2012 19:10:57 (Eastern Standard Time, UTC-05:00)
tattoo gun supplies Eyebrow tattoo supply technical tattoo supply tattoo Power box tattoo supplies kits Intenze ink tattoo ink colors.
Comments are closed.