Click here to Skip to main content
15,891,633 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Need help with calling this method. Pin
kaining896-Aug-09 3:17
kaining896-Aug-09 3:17 
GeneralRe: Need help with calling this method. Pin
Vimalsoft(Pty) Ltd6-Aug-09 3:40
professionalVimalsoft(Pty) Ltd6-Aug-09 3:40 
GeneralRe: Need help with calling this method. Pin
kaining896-Aug-09 3:58
kaining896-Aug-09 3:58 
GeneralRe: Need help with calling this method. Pin
Vimalsoft(Pty) Ltd6-Aug-09 4:04
professionalVimalsoft(Pty) Ltd6-Aug-09 4:04 
QuestionSet default input language of a text box Pin
benams6-Aug-09 1:56
benams6-Aug-09 1:56 
AnswerRe: Set default input language of a text box Pin
Abhishek Sur6-Aug-09 9:50
professionalAbhishek Sur6-Aug-09 9:50 
QuestionApplication Begin request is not getting called Pin
suzzain6-Aug-09 1:42
suzzain6-Aug-09 1:42 
Questionyield return Pin
vishwjeet6-Aug-09 1:32
vishwjeet6-Aug-09 1:32 
Hi,
I am using a enumerable function using "yield return". This allows me to iterate through the items using for each loop. Since this is a lazy evaluation, after each iteration the control returns to the calling function.

How can I use the enumerable function without for each loop?

public static IEnumerable<int> GetValuesUpto(int n)
{

for(int ctr = 1;ctr<=n;ctr++)
{
yield return ctr;
}
}

So, when I call this function i.e.
int[] arr = GetValuesUpto(10);

What would be the result, will it work like a lazy evaluation and will return only the first value, or will it return the desired result?

Waiting for your replies guys!!
Vishwjeet
AnswerRe: yield return Pin
Abhishek Sur6-Aug-09 10:24
professionalAbhishek Sur6-Aug-09 10:24 
Questionhow to get cursor position of the textbox Pin
ansriharsha6-Aug-09 1:25
ansriharsha6-Aug-09 1:25 
AnswerRe: how to get cursor position of the textbox Pin
Abhishek Sur6-Aug-09 10:46
professionalAbhishek Sur6-Aug-09 10:46 
AnswerRe: how to get cursor position of the textbox Pin
ansriharsha23-Aug-09 21:15
ansriharsha23-Aug-09 21:15 
GeneralRe: how to get cursor position of the textbox Pin
Abhishek Sur23-Aug-09 21:54
professionalAbhishek Sur23-Aug-09 21:54 
QuestionDesign a master page Pin
SUDHAKAR PALLAM6-Aug-09 1:01
SUDHAKAR PALLAM6-Aug-09 1:01 
QuestionAjax Refresh Without Timer Pin
platso_5885-Aug-09 23:33
platso_5885-Aug-09 23:33 
AnswerRe: Ajax Refresh Without Timer Pin
Christian Graus5-Aug-09 23:41
protectorChristian Graus5-Aug-09 23:41 
Questionlinkbutton ibn repeater control and based on linkbutton click different modal[poupextender have to show..., Pin
Member 38798815-Aug-09 23:21
Member 38798815-Aug-09 23:21 
AnswerRe: linkbutton ibn repeater control and based on linkbutton click different modal[poupextender have to show..., Pin
Abhishek Sur6-Aug-09 11:54
professionalAbhishek Sur6-Aug-09 11:54 
Questionaspx js Pin
epcode15015-Aug-09 22:44
epcode15015-Aug-09 22:44 
AnswerRe: aspx js Pin
Christian Graus5-Aug-09 23:42
protectorChristian Graus5-Aug-09 23:42 
QuestionWho know ExportPanel Ajax control in Dot net 2008? Pin
aeriscute5-Aug-09 22:32
aeriscute5-Aug-09 22:32 
QuestionAJAX Accordion - CSS Styling Issue Pin
Maynards5-Aug-09 22:18
Maynards5-Aug-09 22:18 
QuestionRange Validator Pin
janani135-Aug-09 22:00
janani135-Aug-09 22:00 
AnswerRe: Range Validator Pin
Arun Jacob5-Aug-09 22:06
Arun Jacob5-Aug-09 22:06 
AnswerRe: Range Validator Pin
Manas Bhardwaj5-Aug-09 22:14
professionalManas Bhardwaj5-Aug-09 22:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.