Skip to content

Instantly share code, notes, and snippets.

View aershov24's full-sized avatar
🇦🇺

Alex Ershov aershov24

🇦🇺
View GitHub Profile
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 06:11
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
public void Consumer()
{
foreach(int i in Integers())
{
Console.WriteLine(i.ToString());
}
}
public IEnumerable Integers()
{
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 06:14
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
string place = "world";
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 06:14
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
public static IEnumerable Where(this IEnumerable items, Predicate< T> prodicate)
{
foreach(var item in items)
{
if (predicate(item))
{
// for lazy/deffer execution plus avoid temp collection defined
yield return item;
}
}
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 06:14
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
public sealed class Singleton
{
// Because Singleton's constructor is private, we must explicitly
// give the Lazy a delegate for creating the Singleton.
static readonly Lazy instanceHolder =
new Lazy(() => new Singleton());
Singleton()
{
// Explicit private constructor to prevent default public constructor.
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 06:14
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
var anonymousData = new
{  
    ForeName = "Jignesh",  
    SurName = "Trivedi"
};  
Console.WriteLine("First Name : " + anonymousData.ForeName);
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 06:14
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
public void Consumer()
{
foreach(int i in Integers())
{
Console.WriteLine(i.ToString());
}
}
public IEnumerable Integers()
{
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 06:14
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
public class TweetsController : Controller {
// GET: /Tweets/
[HttpGet]
public ActionResult Index() {
return Json(Twitter.GetTweets(), JsonRequestBehavior.AllowGet);
}
}
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 06:14
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
public class TweetsController : ApiController {
// GET: /Api/Tweets/
public List Get() {
return Twitter.GetTweets();
}
}
@aershov24
aershov24 / Markdium-Shell.sh
Created September 23, 2020 06:14
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
Integrated Security = true;
Integrated Security = SSPI;
@aershov24
aershov24 / Markdium-text.txt
Created September 23, 2020 06:14
Markdium-60 .NET Interview Questions Devs Must Focus On (ANSWERED)
string greet = String.Format("Hello {0}!", place);