Description | Shortcut | Keyboard Reference |
---|---|---|
Extract Interface | ctrl + O G | ReSharper_ExtractInterface |
Extract Superclass | ctrl + O E | ReSharper_ExtractSuperclass |
Change Signature | ctrl + O S | ReSharper_ChangeSignature |
Convert Anonymous to Named Type refactoring | ctrl + O P | ReSharper_Anonymous2Declared |
Extract Method refactoring | ctrl + O I | [ReSharper_ExtractMethod](https://www.jetbrains.com/he |
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
internal record RowRecord(DataGridViewRow Row, string RowItem); | |
public static class DataGridViewExtensions | |
{ | |
public static void ExportRows(this DataGridView sender, string fileName, string defaultNullValue = "(empty)") | |
{ | |
File.WriteAllLines(fileName, sender.Rows.Cast<DataGridViewRow>() | |
.Where(row => !row.IsNewRow) | |
.Select(row => new RowRecord( |
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 Spectre.Console; | |
using static YourNamespace.Classes.SpectreConsoleHelpers; | |
namespace YourNamespace; | |
internal partial class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
public record Customer(int Id, string FirstName, string LastName, DateOnly BirthDay) : IFormattable | |
{ | |
public int Id { get; set; } = Id; | |
public string FirstName { get; set; } = FirstName; | |
public string LastName { get; set; } = LastName; | |
public DateOnly BirthDay { get; set; } = BirthDay; | |
public string ToString(string format, IFormatProvider _) | |
=> format switch | |
{ | |
"F" => $"{Id,-5}{FirstName} {LastName}", |
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
public record Customer(int Id, string FirstName, string LastName, DateOnly BirthDay) : IFormattable | |
{ | |
public int Id { get; set; } = Id; | |
public string FirstName { get; set; } = FirstName; | |
public string LastName { get; set; } = LastName; | |
public DateOnly BirthDay { get; set; } = BirthDay; | |
public string ToString(string format, IFormatProvider _) | |
=> format switch | |
{ | |
"F" => $"{Id,-5}{FirstName} {LastName}", |
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
var $debugHelper = $debugHelper || {}; | |
$debugHelper = function () { | |
var href = "lib/debugger.css"; | |
var addCss = function () { | |
if (styleStyleIsLoaded(href) === true) { | |
return; | |
} | |
const head = document.head; | |
const link = document.createElement("link"); | |
link.type = "text/css"; |
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 System.Security.Cryptography; | |
public static class Helpers | |
{ | |
public static string RandomNumberString(int length) => | |
RandomNumberGenerator.GetString( | |
choices: new string('a'.To('z').Concat('0'.To('9')).ToArray()), | |
length: length | |
); | |
public static T[] RandomElements<T>(this T[] source, int count) => |
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
public class BirthDay | |
{ | |
private const string Template = | |
""" | |
Hey, | |
{name}'s birthday is on {dob}, which is in {month}. | |
Let's plan a party! | |
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
public interface IBaseEntity | |
{ | |
int Id { get; set; } | |
} |
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
public class ProcedureProperty | |
{ | |
public string Schema { get; set; } | |
public string Name { get; set; } | |
public string Information { get; set; } | |
public string PropertyValue { get; set; } | |
public override string ToString() => $"{Information} = {PropertyValue}"; | |
} |
NewerOlder