This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System; | |
using System.Linq; | |
using System.Linq.Expressions; | |
// ``` ini | |
// | |
// BenchmarkDotNet=v0.13.1, OS=Windows 10.0.18363.1440 (1909/November2019Update/19H2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Resultado() | |
{ | |
var updates = new[] | |
{ | |
new Data { Name = "A1", ReferenceDate = DateTime.Today }, | |
new Data { Name = "B1", ReferenceDate = DateTime.Today }, | |
new Data { Name = "C1", ReferenceDate = DateTime.Today }, | |
new Data { Name = "D1", ReferenceDate = DateTime.Today }, | |
new Data { Name = "A2", ReferenceDate = DateTime.Today.AddMinutes(10) }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
namespace ConsoleApp3 | |
{ | |
static class Program | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Linq.Expressions; | |
namespace ConsoleApp3 | |
{ | |
static class Program | |
{ | |
private static string Foo(string s) => s; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AnonymousExtension | |
{ | |
static void Main(string[] args) | |
{ | |
var person = new { FirstName = "Scott", LastName = "Hunter", Sex = 'M', Age = 25 }; | |
var otherPerson = person.With(new { LastName = "Hanselman" }); | |
Console.WriteLine(otherPerson); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="Estados" class="timeline p-25"> | |
<div class="t-view m-0 m-t-20 Estados"> | |
<input type="hidden" name="Estados.index" autocomplete="off" value="30f0929e-f646-4f3c-a7a6-d432c1b0ce5a"> | |
<div class="tv-header media m-0 p-20"> | |
<ul class="actions"> | |
<li> | |
<a href="#" onclick="return false;" class="deleteRow"> | |
<i class="zmdi zmdi-delete"></i> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://ivanz.com/2011/06/16/editing-variable-length-reorderable-collections-in-asp-net-mvc-part-1/ | |
https://mleeb.wordpress.com/2013/11/23/editing-nested-lists-in-asp-mvc-4/ | |
http://www.joe-stevens.com/2011/06/06/editing-and-binding-nested-lists-with-asp-net-mvc-2/ | |
http://www.devtrends.co.uk/blog/the-complete-guide-to-validation-in-asp.net-mvc-3-part-1 | |
http://nadeemkhedr.com/how-the-unobtrusive-jquery-validate-plugin-works-internally-in-asp-net-mvc/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static SelectList ToSelectList<T, A>(this IEnumerable<T> source, Func<T, A> valueSelector, Func<T, string> textSelector, A? selectdOption = null, string nullOption = "Todos") | |
where T : class | |
where A : struct | |
{ | |
var descriptions = source.ToDictionary(valueSelector, textSelector); | |
var ordered = descriptions.OrderBy(i => i.Value).Select(i => new KeyValuePair<A?, string>(i.Key, i.Value)); | |
var defaul = Enumerable.Repeat(new KeyValuePair<A?, string>(null, nullOption), 1); | |
return new SelectList(defaul.Concat(ordered), "Key", "Value", selectdOption ?? defaul.First().Key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
preprocessor directives | |
goto | |
operator overload | |
pointer | |
methods not virtual by default | |
unsigned integer types | |
user-defined casts | |
output parameters | |
destructor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CountBy; | |
AtLeast, AtMost, Exactly & CountBetween; | |
Sequence | |
Repeat | |
SkipLast | |
AggregateRight | |
Unfold | |
ScanRight | |
PadLeft | |
Move |