This file contains 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
############################### | |
# Core EditorConfig Options # | |
############################### | |
root = true | |
# All files | |
[*] | |
indent_style = space | |
# Code files |
This file contains 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
ReadOnlySpan<char> valueSpan = value.AsReadOnlySpan(); | |
if (!Int32.TryParse(valueSpan.Slice(0, 4), NumberStyles.None, NumberFormatInfo.InvariantInfo, out year) || | |
!Int32.TryParse(valueSpan.Slice(5, 2), NumberStyles.None, NumberFormatInfo.InvariantInfo, out month) || | |
!Int32.TryParse(valueSpan.Slice(8, 2), NumberStyles.None, NumberFormatInfo.InvariantInfo, out day)) | |
{ | |
// Couldn't convert integer, fail | |
return null; | |
} | |
// see entire example : https://github.com/dotnet/coreclr/blob/a16fdf04c50fd7b14b939835a040bd21084f1dc4/src/mscorlib/shared/System/Globalization/JapaneseCalendar.Win32.cs#L162-L165 |
This file contains 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
# When opening a file, EditorConfig plugins look for a file named .editorconfig in the | |
# directory of the opened file and in every parent directory. A search for .editorconfig | |
# files will stop if the root filepath is reached or an EditorConfig file with root=true | |
#is found. (source: http://editorconfig.org/) | |
# top-most EditorConfig file | |
root = true | |
# Don't use tabs for indentation for any file. | |
[*] |
This file contains 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
# CSharp code style settings: | |
[*.cs] | |
csharp_style_var_for_built_in_types = true:none |
This file contains 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
# Code files | |
[*.cs,*.csx,*.vb,*.vbx] | |
indent_size = 4 |
This file contains 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
# top-most EditorConfig file | |
root = true |
This file contains 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
# EditorConfig is awesome: | |
http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Don't use tabs for indentation. | |
[*] | |
indent_style = space | |
# (Please don't specify an indent_size here; that has too many unintended consequences.) |
This file contains 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
<Flags> | |
Enum MouseEventFlags | |
MOUSEEVENTF_ABSOLUTE = &B0000_1_0000_000000_0 | |
MOUSEEVENTF_LEFTDOWN = &B0000_0_0000_000001_0 | |
MOUSEEVENTF_LEFTUP = &B0000_0_0000_000010_0 | |
MOUSEEVENTF_RIGHTDOWN = &B0000_0_0000_000100_0 | |
MOUSEEVENTF_RIGHTUP = &B0000_0_0000_001000_0 | |
MOUSEEVENTF_MIDDLEDOWN = &B0000_0_0000_010000_0 | |
MOUSEEVENTF_MIDDLEUP = &B0000_0_0000_100000_0 | |
End Enum |
This file contains 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
Async Function CalculateMonthlyTotalsAsync() As Task(Of (total As Decimal, average As Decimal, count As Integer)) |
This file contains 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 static System.Console; | |
static void Main(string[] args) | |
{ | |
(int sum, int count) Tally(object[] values) | |
{ | |
var r = (s: 0, c: 0); | |
foreach (var v in values) | |
{ | |
switch(v) |
NewerOlder