Niklas Borson
Niklas Borson
  • 34
  • 14 952
Public vs. Private in C#
This video describes what it means to declare C# class members are public or private. By doing so, you can separate the public interface of a class from its private implementation. Key concepts are abstraction, encapsulation, and information hiding.
The Fraction sample discussed in this video can be found here:
github.com/NiklasBorson/FractionDemo
Переглядів: 74

Відео

Introduction to Win2D
Переглядів 1182 місяці тому
Win2D is a hardware-accelerated 2D graphics library that works with C# and XAML. This video demonstrates creating a simple app that: - Draws lines using Win2D and C# - Uses WinUI3 and XAML for the user interface
Coding with indices and ranges
Переглядів 632 місяці тому
Zero-based vs. one-based indices. Different ways of representing ranges. Off-by-one errors. Code example (binary search).
Pointers and their Discontents - Part 2
Переглядів 1033 місяці тому
It can be useful for programmers in any language to understand the basics of how pointers are used in C what they represent, how they're used, their pitfalls, and how other languages achieve the same things in other ways. For Part 1, see ua-cam.com/video/sqDNWIPA_Ec/v-deo.html. Part 2 covers object lifetime, including dangling pointers, manual heap allocation in C, and the approaches used by ot...
Pointers and their Discontents - Part 1
Переглядів 1554 місяці тому
It can be useful for programmers in any language to understand the basics of how pointers are used in C what they represent, how they're used, their pitfalls, and how other languages achieve the same things in other ways.
How to Think like a Programmer
Переглядів 8255 місяців тому
This video walks through the process of writing a program, starting with an idea and ending with a PowerShell script. Recorded in one take, this video is meant to help new programmers understand the creative process of programming. Not so much the mechanics of coding, as the thinking process used to turn an idea into code.
Scotch Broom Song
Переглядів 939 місяців тому
I thought it would be fun to share this humorous song I wrote a few years ago. It's a love song about a plant. Scotch broom is commonly classified as a noxious invasive species in western North America, but it's also rather pretty when it blooms in the Spring. Words and music are copyrighted by me, Niklas Borson.
PowerShell "Adventure-Helpers" module
Переглядів 699 місяців тому
This video shows an example how you can create a PowerShell module to simplify or automate routine tasks. The example is Adventure-Helpers.psm1, which is part of the open-source AdventureScript project on github. The module source code is in the root directory of the AdventureScript repo, which you can find here: github.com/NiklasBorson/AdventureScript For more about AdventureScript, see my "In...
Introducing AdventureScript
Переглядів 6639 місяців тому
This video introduces the open-source AdventureScript project, which is a scripting language and interpreter designed for creating text adventure games. You can find the project here: github.com/NiklasBorson/AdventureScript If you're not familiar with git and github, you could watch my earlier videos: - GIT 101: ua-cam.com/video/79DLMg0S6ZI/v-deo.html - GIT Part 2: ua-cam.com/video/9UnLf0lB6fU/...
Git Part 2
Переглядів 2510 місяців тому
This is a follow-up to my earlier Git 101 video, which you can find here: ua-cam.com/video/79DLMg0S6ZI/v-deo.html In this video, I demonstrate how to use Git to work on an open-source project hosted by github.com. Specifically, I cover cloning the repo, making a change in your local repo, and submitting a pull request. As an example, I used my own open-source project, AdventureScript, which imp...
Git 101
Переглядів 7910 місяців тому
Git is the most popular version control (or source control) system for programmers. Version control is essential for managing the files in a software project, _especially_ when multiple programmers are working together on the same code. This introductory video describes using git with a local repository, both from the command line and in Visual Studio. In a future video, I will talk about worki...
C# Generics 101
Переглядів 12611 місяців тому
In this video we demonstrate using C# generics, including: - What are generics? - Using the generic List class - Writing a generic method - Writing our own generic list class This video also discusses how to analyze performance, including "Big O" notation. We create an inefficient list class, analyze why it is inefficient, and then implement a faster version.
Inheritance in C#
Переглядів 9011 місяців тому
This video is a deep dive into inheritance in C# and .NET. Inheritance is a key concept in object-oriented programming. This video explains class-based inheritance, what it means, and how it is used with several C# examples. This video also refers back to an example in my earlier "PowerShell Classes" video, which you can find here: ua-cam.com/video/9acqi67b9MU/v-deo.html
Coding a Database Front End in C#
Переглядів 37611 місяців тому
This builds on my previous video "Database Access in PowerShell": ua-cam.com/video/f45zlm4dq_o/v-deo.html In this video, we create a graphical user interface (GUI) that displays data from a Microsoft Access Database. The database and the SQL queries are exactly the same as in the previous video. The application in this video is written in C# and uses the WinUI 3 framework, which is part of the ...
Database Access in PowerShell
Переглядів 32711 місяців тому
This video describes how to query a database from PowerShell. Using a sample Access database, we query for customer orders and demonstrate saving query results as XML or HTML files.
Reading and Writing XML using PowerShell
Переглядів 30911 місяців тому
Reading and Writing XML using PowerShell
PowerShell and Select-Xml
Переглядів 62511 місяців тому
PowerShell and Select-Xml
Value and Reference Types in C#
Переглядів 41Рік тому
Value and Reference Types in C#
PowerShell Regular Expressions
Переглядів 407Рік тому
PowerShell Regular Expressions
PowerShell Classes
Переглядів 1,2 тис.Рік тому
PowerShell Classes
What does `static` mean in C#?
Переглядів 129Рік тому
What does `static` mean in C#?
PowerShell to C#
Переглядів 1,3 тис.Рік тому
PowerShell to C#
Working with Files in PowerShell
Переглядів 6672 роки тому
Working with Files in PowerShell
PowerShell Hashtables
Переглядів 3,6 тис.3 роки тому
PowerShell Hashtables
About Bits
Переглядів 773 роки тому
About Bits
Learn to Program in PowerShell Part 9: Modules and Classes
Переглядів 3213 роки тому
Learn to Program in PowerShell Part 9: Modules and Classes
Learn to Code in PowerShell Part 8: Floating Point Numbers
Переглядів 883 роки тому
Learn to Code in PowerShell Part 8: Floating Point Numbers
Learn to Code in PowerShell Part 7: Binary Numbers
Переглядів 1903 роки тому
Learn to Code in PowerShell Part 7: Binary Numbers
Learn to Program in PowerShell Part 2: Variables and Expressions
Переглядів 5233 роки тому
Learn to Program in PowerShell Part 2: Variables and Expressions
Learn to Program in PowerShell Part 5: Simplify
Переглядів 1723 роки тому
Learn to Program in PowerShell Part 5: Simplify

КОМЕНТАРІ

  • @OghamTheBold
    @OghamTheBold День тому

    👍 I got AI to create the _CanvasControl_ to draw nodes and paths of random _Percolation Grids_ (the AI and myself got confused with all of the different Framework Namespaces and at one point I think I even started hallucinating 😵)

  • @BelowAverageRazzleDazzle
    @BelowAverageRazzleDazzle 27 днів тому

    Nicely done,

  • @hasenbeck76
    @hasenbeck76 Місяць тому

    nice recap. thx

  • @niklasborson5790
    @niklasborson5790 2 місяці тому

    Oops, there's a bug in the Age property at 31:10 in the video. Here's a better version: int Age => YearFromYYYMMDD( YYYYMMDD(DateOnly.FromDateTime(DateTime.Now)) - YYYYMMDD(BirthDate) ); // Convert date to an integer in the form YYYYMMDD. int YYYYMMDD(DateOnly date) => date.Year * 10000 + date.Month * 100 + date.Day; int YearFromYYYMMDD(int value) => value / 10000;

  • @Ferryman95
    @Ferryman95 2 місяці тому

    Ahh! So the opposite of what I do more or less? Got it! xD

  • @spike3627
    @spike3627 4 місяці тому

    Thanks, you really helped me out here!

  • @believeinkarma939
    @believeinkarma939 5 місяців тому

    Pls upload more frequently..😅

    • @niklasborson5790
      @niklasborson5790 5 місяців тому

      Haha, I'll take that as a compliment! Thanks! Sorry I haven't uploaded in a while, though.

  • @NicholasWest-b5e
    @NicholasWest-b5e 6 місяців тому

    Thanks for the video 👍 it helped

  • @rijack64
    @rijack64 7 місяців тому

    It's a pretty good video but you need to work on elocution. A lot of what you say sounds mumbled, unless it's your microphone.

  • @kafkakos3618
    @kafkakos3618 8 місяців тому

    mate, your videos are great, best on YT to learn PS.

  • @sabino.software
    @sabino.software 9 місяців тому

    You know, UA-cam recommendation worked really well right now. I was recently considering developing something similar to what you did, but wow, this is extremely well made. Thank you for sharing! And looking at the documentation, seems to even open the possibility of porting to other languages, which is great!

    • @niklasborson5790
      @niklasborson5790 9 місяців тому

      Thank you! Yes, I did anticipate the possibility of porting to other languages. P.S., if you're interested in porting to another language, let me know. Unfortunately, I don't have the language skills myself, but I would be happy to work with you.

  • @wenquai
    @wenquai 9 місяців тому

    Cool idea and project! The repo looks great too

  • @niklasborson5790
    @niklasborson5790 9 місяців тому

    Please comment if you successfully play through the "Oxbow Castle" game -- or if you try it and get stuck. I'm curious if the clues work for people.

  • @rahsidqk
    @rahsidqk 10 місяців тому

    Thanks for the explanation, and great to see the Big o notation. Looking forward to upcoming videos!

    • @niklasborson5790
      @niklasborson5790 10 місяців тому

      Thanks for your comment! I have some new material in the works!

  • @NoDoubt-ChillOut
    @NoDoubt-ChillOut 11 місяців тому

    I have followed the entire PowerShell series. I like how it pedagogically follows the object-oriented approach in programming. The channel could be said to be underrated ;)

    • @niklasborson5790
      @niklasborson5790 11 місяців тому

      Thank you so much! I'm glad you found it helpful 😃

  • @Joshuaa.z
    @Joshuaa.z 11 місяців тому

    Thank you, that was awesome😊

  • @cazmaj
    @cazmaj 11 місяців тому

    Fantastic, thank you very much!

  • @DailenGunter
    @DailenGunter 11 місяців тому

    Fantastic video! I really like the progressive complexity of the examples. I was doing well until inheritance, and then the practical applications were lost to me 😂 i still have about 9 mins left to finish watching, so maybe it'll make more sense then!

    • @niklasborson5790
      @niklasborson5790 11 місяців тому

      Thanks! I can't remember how much I covered inheritance in this video, but I probably only scratched the surface. Maybe I should do a video just about inheritance.

  • @matrixview
    @matrixview Рік тому

    Hi Niklas, thanx for all your videos! Very much appreciated, even though your channel serves a "niche market"... probably PS fans (like me). Since you're talking about XML and XPath recently, just a tip: take a look at a tool called: Xidel. It's amazing for reading/parsing XML/HTML/Json, handling API's and webscraping. It has many options and DSL's/methods like XQuery/XPath/CSS/HTML-templates/RegEx/Jsonic. Unfortunately it's written in FreePascal, not C#. However, calling Xidel's binary can of course be easily wrapped in PS functions (module). Very powerful addition to PS!

  • @leeblack2103
    @leeblack2103 Рік тому

    Can you parse the data and write it to a database (sql, access)?

    • @niklasborson5790
      @niklasborson5790 Рік тому

      You could. It sounds like a good topic for another video, although I don't have a lot of experience working with SQL.

  • @Bruhfinally
    @Bruhfinally Рік тому

    Great video. Would be cool to see F# and powershell side by side too 😊

  • @shanelonn7728
    @shanelonn7728 Рік тому

    Love your detailed explanations. Your videos are a goldmine of info. Thank you!!

  • @shanelonn7728
    @shanelonn7728 Рік тому

    This explanation was fantastic🔥. Thank you. I’ll be watching your other powershell videos to grasp working with it.

  • @DailenGunter
    @DailenGunter Рік тому

    Perfect video for the niche I'm in! Pwsh to c# 😊

    • @Core1138
      @Core1138 Рік тому

      I’m going this path too. Can you tell me more?

  • @leasj2012
    @leasj2012 Рік тому

    One of the best PS tutorials I've seen. Thanks!

  • @dabunnisher29
    @dabunnisher29 Рік тому

    Get out of my mind. Was studying C# last night and wanted to understand this better. Thank you.

  • @paulegan3783
    @paulegan3783 Рік тому

    Very helpful, thanks! Would you follow up with when a static class might be useful with an example(s)?

    • @niklasborson5790
      @niklasborson5790 Рік тому

      Thanks for the suggestion! That probably would have been good to include in this video. I will consider doing a follow-up. Meanwhile, an example of a static class is System.Math. Because it's static, you can't actually create an object of type Math. The class just serves as a way of grouping related static methods (like Math.Sqrt, and Math.Pow) and constants (like Math.PI).

    • @bankj5
      @bankj5 Рік тому

      Great video, thank you

  • @DonBuckle
    @DonBuckle Рік тому

    Niklas - problemet $csv | ForEach-Object { $pop[$_.Name] = $_.CENSUS2010POP} produces an error in PowerShell 7.3.4:- InvalidOperation: Line | 2 | $pop[$_.Name] = $_.CENSUS2010POP | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot index into a null array. It works correctly in PowerShell 5.1 ...... Thanks for this excellent PowerShell series

    • @niklasborson5790
      @niklasborson5790 Рік тому

      That's funny, I tested this using PowerShell 7.something. I hope the video is still useful to you even with that error!

    • @niklasborson5790
      @niklasborson5790 Рік тому

      Eight months late, but I finally realized what caused this. You need to initialize $pop to an empty hashtable before executing the above statement. Otherwise the expression $pop[$_.Name] will fail because $pop is null.

  • @DonBuckle
    @DonBuckle Рік тому

    Follow this series! PowerShell is new to me ... have watched many and tried to absorb ( it has to be said ... not very successfully) but your tutorials are some of the best! Both in style and content. I have re-watched each of them and working along with them ... excellent! Highly recommended! - 76 year old of dubious intellectual stature.

  • @DwynAgGaire
    @DwynAgGaire Рік тому

    Many thanks sir!

  • @DwynAgGaire
    @DwynAgGaire Рік тому

    pipe to Format-List, what a gem!!

  • @kimroyph
    @kimroyph Рік тому

    Very impressed with the approach and presentation - working through little projects like this is for me (76 year old with 'self recognised brain-fade') feels like progress. There is, I believe, one other on UA-cam worthy of mention (for the exceptional visual presentation) ABMedia. - Thank you Niklas!!!

  • @thesecret111
    @thesecret111 2 роки тому

    It's funny how this youtuber has only 30 subs and explain better than majority! While some pathetics others puts advertising + merchandise + etc. Teaches you nothing!! Keep this channel growing! Never give up!

  • @saleemdanfort
    @saleemdanfort 2 роки тому

    Thank you for the video

  • @Sjongleringsmannen
    @Sjongleringsmannen 3 роки тому

    Thank you, Niklas, for great videos on PowerShell programming.

  • @mydetlef
    @mydetlef 3 роки тому

    Thanks for sharing this. A couple of recommendations. Concentrate on the topic of the video so here modules and classes. Using a prime algorithm or something like that just bloats things and distracts from the topic. This can find its place in another video. Two simple functions are sufficient for the topic of modules and get to the heart of the topic. There is still a lot to explain about modules and that is not covered here or cannot be dealt with due to lack of time. Presentation: Almost everyone does not see the video in full screen mode on a PC. Most people's attention is focused on the center of the screen. So when you display something in a terminal, the line of your input should be roughly in the center of the video and have a large font that can also be read on a tablet or smartphone. A terminal window in the middle would be better. Many lines do not have to be visible because they are not needed for the learning effect. And you don't need long lines for your examples.

    • @niklasborson5790
      @niklasborson5790 3 роки тому

      Thanks for your thoughtful feedback. You're right that this video is not very focused on just the specific topic of modules and classes, nor does it cover those topics comprehensively. Just to explain where I'm coming from, the purpose of this series is to teach first-time programmers how to code. The videos are meant to be watched in order, and each video further develops concepts from before while also introducing some new topic. I'll think about what you said, though. Maybe I should do some shorter, more focused videos. Thanks also for the tips on small screens.

  • @mylearnings910
    @mylearnings910 3 роки тому

    I have started to learn myself. Thanks for the series. Please do use case on Infra side if possible.

    • @niklasborson5790
      @niklasborson5790 3 роки тому

      Thanks for the comment! I am certainly open to suggestions, but didn't quite understand what you're asking for. Can you clarify what you mean by Infra side?

    • @mylearnings910
      @mylearnings910 3 роки тому

      @@niklasborson5790 Hi, I was asking if you could explain with examples, especially from the infrastructure automation use case.

    • @niklasborson5790
      @niklasborson5790 3 роки тому

      I see. I had to look up what "infrastructure automation" is. It seems to be about automating the management of hardware, software, networking components, etc. in the cloud or an on-premises network. This is absolutely something PowerShell is good at, but it's outside of my skillset so I wouldn't feel competent to do a video on it. Sorry. :-(

    • @nborson
      @nborson 3 роки тому

      @@niklasborson5790 These programming skills will be very useful for creating scripts for infrastructure management, even if you don't cover the specific modules most useful for that (i.e. Active Directory).

    • @mylearnings910
      @mylearnings910 3 роки тому

      @@niklasborson5790 Thanks for the reply. I am trying to learn PowerShell for automating network and mundane task in network security . Anyway as Nathan has highlighted this should be transferable skill.