Code Monkey home page Code Monkey logo

dotnet-cs-string-mask's Introduction

Project was created with the following commands:

-> .
create solution
dotnet sln -n "StringMask"

create console project
dotnet new console -n "StringMask"

add project to solution
dotnet sln StringMask.sln add ./StringMask/StringMask.csproj

-> ./StringMask
to add Nuget package
dotnet add package BenchmarkDotNet

To run the project and see benchmark output use:

-> ./StringMask
dotnet run -c Release

The output should resamble this table:

Method password unmaskedLength Mean Error StdDev Gen 0 Allocated
withIteration Password123! 3 171.73 ns 0.350 ns 0.273 ns 0.1273 400 B
withStringBuilder Password123! 3 83.69 ns 0.581 ns 0.543 ns 0.0587 184 B
withStringConstructor Password123! 3 37.08 ns 0.250 ns 0.234 ns 0.0382 120 B
withStringCreate Password123! 3 29.02 ns 0.199 ns 0.176 ns 0.0433 136 B

VS Code

Install following plugins for VS Code:

  • C# from Microsoft

For auto formating of .cs files add the following to VS Code settings.json:\

"[csharp]": {
  "editor.defaultFormatter": "ms-dotnettools.csharp"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.