Producing ascii art via C#

前端 未结 3 1560
渐次进展
渐次进展 2021-01-05 19:13

I once did a programming test for a job, which involved producing ASCii art in C#. I didn\'t really do well at this, as I had little idea or experience of doing this in C# (

3条回答
  •  一整个雨季
    2021-01-05 19:41

    ASCII art is pretty general, but if you want to produce an ASCII banner or heading then I've ported the popular FIGlet font generation to .NET:

    https://github.com/drewnoakes/figgle

    It's very easy to use, and available on NuGet for almost every version of .NET (netstandard1.3 and above, so .NET Framework as well as .NET Core, Xamarin, etc...).

                _ _          __    __           _     _   _ 
      /\  /\___| | | ___    / / /\ \ \___  _ __| | __| | / \
     / /_/ / _ \ | |/ _ \   \ \/  \/ / _ \| '__| |/ _` |/  /
    / __  /  __/ | | (_) |   \  /\  / (_) | |  | | (_| /\_/ 
    \/ /_/ \___|_|_|\___( )   \/  \/ \___/|_|  |_|\__,_\/   
                        |/       
    

    Produced via:

    Console.WriteLine( 
        FiggleFonts.Ogre.Render("Hello, World!"));
    

提交回复
热议问题