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
class ExceptionThrowingExample | |
{ | |
public void DoSomething() | |
{ | |
Console.WriteLine("Starting to do something..."); | |
throw new Exception(); | |
//Will never be called. The throw command terminates the program... | |
Console.WriteLine("...finished doing something."); |
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
class ListFile | |
{ | |
static void Main(string[] args) | |
{ | |
var arg0 = args[0]; | |
try | |
{ | |
var counter = 0; | |
if (args.Length <= 0) |
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
C:\Windows\System32\WindowsPowerShell\v1.0 | |
ModuleType Name ExportedCommands | |
---------- ---- ---------------- | |
Manifest AppLocker {} | |
Manifest BitsTransfer {} | |
Manifest PSDiagnostics {} | |
Manifest TroubleshootingPack {} | |
Manifest WebAdministration {} |
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
Feature: User accounts | |
Scenario: A user can log in to the site | |
Given: I am on the log in page | |
When: I fill in user details | |
And: click "Sign in" | |
Then: I should be redirected to the "my account" page |
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
# First version | |
def fizzbuzz num | |
answer = [] | |
answer.push 'fizz' if num % 3 == 0 | |
answer.push 'buzz' if num % 5 == 0 | |
answer.push num if num % 3 != 0 and num % 5 != 0 | |
NewerOlder