• /r/powershell
  • add-content with a line break?

    I’m trying to get output to a txt file using the following: ( add-content $outfile $user.name, $group.name which produces: NewShoes4U Domain Users NewShoes4U GroupOne NewShoes4U GroupTwo What I want is: NewShoes4U Domain Users NewShoes4U GroupOne NewShoes4U GroupTwo What is the most straightforward way to produce this, without using -nonewline ( powershell verison > 4 ) […]

  • /r/csharp
  • Getting values of method parameters from custom attributes

    I’m using custom attributes in C#. I can’t figure out how to get the value of a method parameter with a custom attribute applied to it. I call my method like this: carProcessor(4, “V8”); My method signature looks like: [CarTypeAttribute(“Pontiac”)] public void carProcessor(int doorCount, [CarParamAttribute(“EngineType”)] string engine) { process(); } I retrieve it’s values via […]