Skip to content

Instantly share code, notes, and snippets.

@PlagueHO
PlagueHO / ICloneable_Class_PowerShell_Finished.ps1
Created Mar 11, 2016
Creating an ICloneable class in PowerShell, with the Clone method implemented.
View ICloneable_Class_PowerShell_Finished.ps1
class Car:ICloneable {
[Object] Clone () {
$NewCar = [Car]::New()
foreach ($Property in ($this | Get-Member -MemberType Property))
{
$NewCar.$($Property.Name) = $this.$($Property.Name)
} # foreach
return $NewCar
} # Clone
[String] $Make
@davidfowl
davidfowl / dotnetlayout.md
Last active Apr 21, 2021
.NET project structure
View dotnetlayout.md
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
  tests/