Explain IEnumerable in C# ( C# Interview Questions)

preview_player
Показать описание

---------------------------------------------------------------------------------------
See our other Step by Step video series below :-
-----------------------------------------------------------------------------------------------
For more details :-
📱 Mob. No. : +91-9967590707 / +91 7700975156 / +91-22-49786776

Share, Support, Subscribe and Connect us on!!!

Рекомендации по теме
Комментарии
Автор

thank you sir, it’s bcz of u i am a better c# developer

scotolivera
Автор

Nice and real tutorial. Thanks for sharing. I use object generic IEnumerable in the abstract class, and I use a list of myclass in my subclasses.

imadabab
Автор

Sir, please make video about IEnumerator and Yield. Thank you in advance!

artmasterio
Автор

I'm not a fan of this explanation. At 1:29, the reason you can still use your foreach loop on your list even though you haven't explicitly called IEnumerator is because List inherit from IEnumerable. You can see that if you just "right click" and peek definition on List

elliottharrison
Автор

Hi Questpond,
Sir Please clear this doubt I have done same things what you have done in your code but I Didn't use IEnumerable but still there is no error and I am getting desired output. Then Why to use IEnumerable.

Please have a Look at these piece of lines.

using System;
using System.Collections;
using System.Collections.Generic;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
foreach(var temp in get()){
Console.WriteLine(temp);
}
}

static dynamic get(){
int a=1;
var arlist1 = new ArrayList();
arlist1.Add(1);
arlist1.Add("Bill");
arlist1.Add(" ");
arlist1.Add(true);
if(a>1)
return "good";
else
return arlist1;
}

}
}


and getting output :
1
Bill

True

Shreya-ffdxfvs
Автор

There might a scenario where we going to implement this pattern to some cases it would be in iterator pattern and in some cases it will be used in a singleton design pattern as well...coz in singleton it acts wrapper + iterator

ketankumarsingh
Автор

Hi sir please explain delegates with some realtime example

shabiyabanu
Автор

Your question's answer is that - IEnumerable uses an Iterator design pattern.
Thank you.

CodeSample
Автор

IEnumerable uses Iterator design pattern

ShamimShaikhAM
Автор

Sir, I am confuse between Thread and Async Await.. plz make a video on them

niteshchaurasia
Автор

Can you explain sir ...runtime polymorphism

Anuj_sk
Автор

IEnumerable/IEnumerator implement Iterator Pattern @Questpond

stutiagarwal
Автор

What is the difference between first() and firstordefualt()

jerinpalissery
Автор

sir please dont west time on other talk you have create 8 min video and 4 min you have waste on other talk so please

itsniks
Автор

You're jumping from everywhere focus only on one thing. Another thing is explain it first technically not by your own terms then proceed the explanation just explaining that part. I understand nothing as its really vague you keep jumping to list then Interview Question etc. There's no point in learning how to answer a Question when one doesn't understand the core concept of the Answer. Memorizing and understanding the concept are two different thing. You're teaching somebody to become a Robot instead of a Thinker this ain't India.

exogendesign
visit shbcf.ru