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
nullness inspection | |
{ | |
a?.M(); | |
a.F(); // <= possible NRE | |
a?.M(a != null); // <= expression always true | |
} | |
inspection "Redundant null-propagation" | |
{ | |
var a = new A(); |
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
// CA "To declaration statement" | |
{ | |
var t = F(out var x); | |
// => | |
int x; | |
var t = F(out x); | |
} |
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
D:\test>csc /o SlowDelegates01.cs | |
Microsoft (R) Visual C# Compiler version 4.0.30319.34209 | |
for Microsoft (R) .NET Framework 4.5 | |
Copyright (C) Microsoft Corporation. All rights reserved. | |
D:\test>SlowDelegates01.exe | |
1 => 00:00:00.0159245 | |
2 => 00:00:00.0147080 | |
3 => 00:00:00.0145497 |
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.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace TypedTaglessFinal | |
{ |
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
# ===================================================================================================================== | |
# Power Plan Management | |
# --------------------------------------------------------------------------------------------------------------------- | |
$powerPlans = powercfg -l | |
$highPerformancePowerPlan = $powerPlans | %{ if ($_.contains("High performance")) { $_.split()[3] }} | |
$balancedPowerPlan = $powerPlans | %{ if ($_.contains("Balanced")) { $_.split()[3] }} | |
$powerSaverPowerPlan = $powerPlans | %{ if ($_.contains("Power saver")) {$_.split()[3] }} | |
$currentPowerPlan = $(powercfg -getactivescheme).split()[3] | |
function Get-Plan |
OlderNewer