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
| function Increment | |
| { | |
| Param([int] $number) | |
| $result = $number+1 | |
| $result | |
| } | |
| Write-Host "And the answer is" (Increment 41) |
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 int Increment(int number) | |
| { | |
| return ++number; | |
| } |
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
| function SimpleFunction | |
| { | |
| Out-Host "Hello method host" | |
| } | |
| SimpleFunction |
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 SimpleMethod() | |
| { | |
| Console.WriteLine("Hello Method World!"); | |
| } |
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 } |
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
| 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
| 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
| $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; | |
| using System.Text; | |
| namespace ConsoleApplication | |
| { | |
| public class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| StringBuilder messageOfTheDay = new StringBuilder(); |