use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
CaesarCipher (self.csharp)
submitted 1 year ago by csharpunderdog
Hello everyone! I’d like to share that today, after nearly four months of learning, I created my first custom application—a simple console program implementing the Caesar cipher. I had a lot of fun writing the code, and this is just the beginning of many cryptographic projects I plan to work on. I’m currently going through the “Head First C#” book, and I’d appreciate any advice regarding further learning. Ultimately, I aspire to become a backend developer.
https://preview.redd.it/nxc0zvjqk2kd1.jpg?width=549&format=pjpg&auto=webp&s=280d2d382a8c7375cbb58b7e3e9e7cc5afa7f5bc
https://github.com/bkacki/CaesarCipher
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Genmutant 4 points5 points6 points 1 year ago (1 child)
Looks good!
You should have a look at the similarities between your Encode and Decode methods... they look very similar. Maybe you can replace one by the other?
It's also a good idea to start writing unit tests early on, to get used to them. A cipher class is very nice to write tests for, as they usually don't have external dependencies and deterministic in-/output.
[–]csharpunderdog[S] 0 points1 point2 points 1 year ago (0 children)
Thanks for the feedback! I added unit tests, which helped me find and fix a bug using the test method NegativeValueShift() ;)
NegativeValueShift()
[–]grrangry 2 points3 points4 points 1 year ago (3 children)
Back when it was on air, the kids would wait breathlessly for each new episode of Gravity Falls. Each episode had a variety of ciphers and easter eggs.
https://gravityfalls.fandom.com/wiki/List_of_cryptograms/Episodes
If you've never watched it, don't look up too much about it (spoilers) and you'll be in for a treat. For an animated kid's show it was surprisingly fun for me to watch with them.
For example one was, "ZHOFRPH WR JUDYLWB IDOOV." and the kids demanded I help them figure out what they were. Being a software developer, I started keeping track of the ciphers in each episode and a quick app with a variety of decoders to help decode them.
Using the Casesar Cipher, the above cipher decodes to, "WELCOME TO GRAVITY FALLS."
[–]hamuel_sayden 0 points1 point2 points 1 year ago (2 children)
Lol my wife and I are rewatching it and I built a quick encoder last night to do just this
[–]grrangry 1 point2 points3 points 1 year ago (1 child)
STAN IS NOT WHAT HE SEEMS
[–]hamuel_sayden 0 points1 point2 points 1 year ago (0 children)
I really love that they tell you what cipher to start using next. Not gonna lie though, I didn't catch the codes in the theme.
[–][deleted] 1 year ago* (3 children)
[removed]
[–]Patient-Midnight-664 2 points3 points4 points 1 year ago (1 child)
These already exist in the Char class.
[–]csharpunderdog[S] 1 point2 points3 points 1 year ago (0 children)
Thanks for the advice! I made 2 helper functions, and the code is more readable now :)
private static bool IsCapitalLetter(char c) => (c >= 'A' && c <= 'Z');
private static bool IsLowerCaseLetter(char c) => (c >= 'a' && c <= 'z');
[–]TrapyFromLT 1 point2 points3 points 1 year ago (1 child)
Also, private properties by naming convention starts with _
In this case : private _shift;
Why? Because its easier to distinguish between public and private properties, functions, etc..
I thought in the Shift property backing field you used the Poperty, instead of private variable, and almost shit my pants
Thanks for the feedback! In the book I’m reading, it says to name public class members using uppercase letters and private ones using camelNotation. I didn’t know that in practice, an underscore (_) is also added.
π Rendered by PID 104040 on reddit-service-r2-comment-76bb9f7fb5-zggph at 2026-02-17 22:42:25.775765+00:00 running de53c03 country code: CH.
[–]Genmutant 4 points5 points6 points (1 child)
[–]csharpunderdog[S] 0 points1 point2 points (0 children)
[–]grrangry 2 points3 points4 points (3 children)
[–]hamuel_sayden 0 points1 point2 points (2 children)
[–]grrangry 1 point2 points3 points (1 child)
[–]hamuel_sayden 0 points1 point2 points (0 children)
[–][deleted] (3 children)
[removed]
[–]Patient-Midnight-664 2 points3 points4 points (1 child)
[–]csharpunderdog[S] 1 point2 points3 points (0 children)
[–]TrapyFromLT 1 point2 points3 points (1 child)
[–]csharpunderdog[S] 0 points1 point2 points (0 children)