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
$name = "Harvey Specter" | |
$aNumber = 42 | |
echo "Hello $name, your number is $aNumber" |
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
$myValue = 12 | |
$myValue.GetType() | |
$myValue = "Hello" | |
$myValue.GetType() |
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
[int]$i = 12 | |
$i.GetType() | |
$i = "Hello" | |
$i.GetType() |
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
$name = "Harvey Specter" | |
$aNumber = 42 | |
echo "Hello $name, your number is $aNumber and this guy never was here $neverDefined" |
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.Text; | |
namespace ConsoleApplication | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
StringBuilder messageOfTheDay = new StringBuilder(); |
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
$currentDate = Get-Date | |
$messageOfTheDay = "" | |
if($currentDate.Day % 2 -ne 0) | |
{ | |
$messageOfTheDay = "Today is an odd Day, " | |
} | |
else | |
{ | |
$messageOfTheDay = "Today all should be even, " |
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; | |
namespace ConsoleApplication | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
while (new Random().Next(0, 50) > 50) | |
{ |
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
while((Get-Random -Minimum 1 -Maximum 100) -gt 50) | |
{ | |
Write-Host "While... Random seems to be bellow 50." | |
} | |
Do | |
{ | |
Write-Host "Do While... Random seems to be bellow 50." | |
} while((Get-Random -Minimum 1 -Maximum 100) -gt 50) |
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
$items | Write-Host |
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
$items | foreach { Write-Host "$_ has a length of" $_.Length } |