• /r/csharp
  • Help with coding style

    Hello fellow coders and i hope you are having a great day. I have just started to learn C# and just started working on a console rpg, only the main menus are done but im wondering if you could give and critique on my coding style and how i can improve it. You can read […]

  • /r/powershell
  • Can anyone please breakdown what is going on in this script?

    $node = $appConfig.configuration.connectionStrings.add | Where-Object {$_.name -eq $dbName} $node.connectionString = $updatedConnectionString Where did add come from? What does $_ stand for here? How is $node.connectionString assigning to the attribute when there is no property on $node called connectionString? Lastly, any resource that can help me understand this and not ask stupid questions will be really […]

  • /r/powershell
  • Wrapper for New-CimSession

    Hi, I’m currently writing a bunch of tools that require CimSessions. I noticed that I’m creating a new CimSession in each tool, doing my thing, and removing the CimSession. The controller script runs each of those tools, resulting in slow performance due to the many CimSessions being established and removed again. So I thought it’s […]

  • /r/csharp
  • Come discuss your side projects! [July 2017]

    Hello everyone! This is a monthly thread for sharing and discussing side-projects created by /r/csharp‘s community. Feel free to create standalone threads for your side-projects if you so desire. This thread’s goal is simply to spark discussion within our community that otherwise would not exist. Please do check out newer posts and comment on others’ […]

  • /r/powershell
  • I’m afraid of nesting foreach loops, so I wrote this cockamamie script to get installed hotfixes. But I’m pretty sure there’s a better way to do it. Please help.

    So I need to check a list of computers to see if they have these specific KB’s installed, and I can foreach the comps OK, but I’m pretty sure I have a lot of unnecessary code in here. Is there a way to put these KBs into an array and nest a foreach loop inside […]

  • /r/csharp
  • New to C#, having trouble with reflection?

    I started by posting this in learnc# and I asked a few people I know. public static class MagicObjectColumns { public static EntityColumn ValName1; public static EntityColumn ValName2; public static EntityColumn ValName3; public static EntityColumn ValName4; public static EntityColumn ValName5; public static List<EntityColumn> AllColumns { get; } } I have an Expando Object that can […]