Регулярные короткие заметки по C# и .NET.
Просто о сложном для каждого.
admin - @haarrp
Post #126
1.04K
C# @csharp_1001_notes
Showing posts older than #127 · Back to latest

CheckPerfect(6) ➞ true🏆 Leave your solutions in the comments. The solution will be posted below in a couple of hours 👇
CheckPerfect(28) ➞ true
CheckPerfect(496) ➞ true
CheckPerfect(12) ➞ false
CheckPerfect(97) ➞ false

IDisposable and Dispose so that you can use your object in a using statement such as using(var foo = new MyObject()) { }.Dispose, just in case the calling code forgot to dispose of you.


C# 1001 notes ✨ Here is a solution for the #challenge above


MakeTitle("This is a title") ➞ "This Is A Title"
MakeTitle("capitalize every word") ➞ "Capitalize Every Word"
MakeTitle("I Like Pizza") ➞ "I Like Pizza"
MakeTitle("PIZZA PIZZA PIZZA") ➞ "PIZZA PIZZA PIZZA"
For your convenience: dotnetfiddle.




true if a number is prime, and false otherwise. A prime number is any positive integer that is evenly divisible by only two divisors: 1 and itself.2, 3, 5, 7, 11, 13, 17, 19, 23, 29
Examples:isPrime(31) ➞ trueFor your convenience: dotnetfiddle.
isPrime(18) ➞ false
isPrime(11) ➞ true