Which of the following data type should be used for monetary value?
Anonymous Quiz
5%
Long
8%
Float
15%
Double
71%
Decimal
#humor #newsletter
Богатая неделя на материалы из мира .NET:
🔸 Introduction to System.Text.Json Through Examples
🔸 Async processing of long-running tasks in ASP.NET Core
🔸 Migration to ASP.NET Core in .NET 6
🔸 HTTP/3 support in .NET 6
🔸 Azure Table Storage with ASP.NET Core
🔸 SQL SERVER – Troubleshooting High CPU
🔸 6 Essential Tools to Detect and Fix Performance Issues in .NET
🔸 C# 10.0: File Scoped Namespaces – Get More Space For Your Code
🔸 ASP.NET Core updates in .NET 6 Release Candidate 1
🔸 Backend For Frontend Authentication Pattern with Auth0 and ASP.NET Core
Учение свет, но отдыхать тоже не забывайте 😉
Богатая неделя на материалы из мира .NET:
🔸 Introduction to System.Text.Json Through Examples
🔸 Async processing of long-running tasks in ASP.NET Core
🔸 Migration to ASP.NET Core in .NET 6
🔸 HTTP/3 support in .NET 6
🔸 Azure Table Storage with ASP.NET Core
🔸 SQL SERVER – Troubleshooting High CPU
🔸 6 Essential Tools to Detect and Fix Performance Issues in .NET
🔸 C# 10.0: File Scoped Namespaces – Get More Space For Your Code
🔸 ASP.NET Core updates in .NET 6 Release Candidate 1
🔸 Backend For Frontend Authentication Pattern with Auth0 and ASP.NET Core
Учение свет, но отдыхать тоже не забывайте 😉
#book
Программируем на C# 8.0
Гриффитс И.
C# — универсальный язык, который может практически всё! Иэн Гриффитс рассказывает о его возможностях с точки зрения разработчика, перед которым стоит задача быстро и эффективно создавать приложения любой сложности.
Множество примеров кода научат работать с шаблонами, LINQ и асинхронными возможностями языка. Вы разберетесь с асинхронными потоками, ссылочными типами, допускающими значение NULL, сопоставлениями с образцом, реализациями по умолчанию для метода интерфейса, диапазонами и синтаксисом индексации и многим другим.
Скачать книгу
Программируем на C# 8.0
Гриффитс И.
C# — универсальный язык, который может практически всё! Иэн Гриффитс рассказывает о его возможностях с точки зрения разработчика, перед которым стоит задача быстро и эффективно создавать приложения любой сложности.
Множество примеров кода научат работать с шаблонами, LINQ и асинхронными возможностями языка. Вы разберетесь с асинхронными потоками, ссылочными типами, допускающими значение NULL, сопоставлениями с образцом, реализациями по умолчанию для метода интерфейса, диапазонами и синтаксисом индексации и многим другим.
Скачать книгу
What will be the output of the following program?
Anonymous Quiz
9%
210
54%
210.12
30%
Compile-time error
7%
Runtime error
#post
Now, for the final post in this mini-series, let's turn our attention to a feature that was originally scheduled for release in C# 10, but didn't quite make the cut: required properties.
Read more...
Now, for the final post in this mini-series, let's turn our attention to a feature that was originally scheduled for release in C# 10, but didn't quite make the cut: required properties.
Read more...
#challenge
💻 Capitalize the First Letter of Each Word | #easy
Create a function that takes a string as an argument and converts the first character of each word to uppercase. Return the newly formatted string.
Examples:
🏆 Leave your solutions in the comments. The solution will be posted below in a couple of hours 👇
#interview
💻 Capitalize the First Letter of Each Word | #easy
Create a function that takes a string as an argument and converts the first character of each word to uppercase. Return the newly formatted string.
Examples:
MakeTitle("This is a title") ➞ "This Is A Title"For your convenience: dotnetfiddle.
MakeTitle("capitalize every word") ➞ "Capitalize Every Word"
MakeTitle("I Like Pizza") ➞ "I Like Pizza"
MakeTitle("PIZZA PIZZA PIZZA") ➞ "PIZZA PIZZA PIZZA"
🏆 Leave your solutions in the comments. The solution will be posted below in a couple of hours 👇
#interview
Which of the following statements is TRUE?
Anonymous Quiz
64%
A readonly field can be initialized either at the declaration or in a constructor
12%
A readonly field can be initialized either at the declaration or in a constructor or static methods
11%
A readonly field can only be initialized in a constructor
13%
A readonly field can only be initialized at the declaration
📝 What is the difference between continue and break statements in C#?
🔸 using break statement, you can jump out of a loop
🔸 using continue statement, you can jump over one iteration and then resume your loop execution
#post
🔸 using break statement, you can jump out of a loop
🔸 using continue statement, you can jump over one iteration and then resume your loop execution
#post
What will be the of the following code snippet?
Anonymous Quiz
22%
Code executes successfully prints nothing
54%
This is base class constructor
16%
Compile time error
9%
None of the above
📝 When to use Finalize vs Dispose?
🔸 The finalizer method is called when your object is garbage collected and you have no guarantee when this will happen (you can force it, but it will hurt performance).
🔸 The Dispose method, on the other hand, is meant to be called by the code that created your class so that you can clean up and release any resources you have acquired (unmanaged data, database connections, file handles, etc) the moment the code is done with your object.
The standard practice is to implement
And in your finalizer, you call
#post
🔸 The finalizer method is called when your object is garbage collected and you have no guarantee when this will happen (you can force it, but it will hurt performance).
🔸 The Dispose method, on the other hand, is meant to be called by the code that created your class so that you can clean up and release any resources you have acquired (unmanaged data, database connections, file handles, etc) the moment the code is done with your object.
The standard practice is to implement
IDisposable
and Dispose
so that you can use your object in a using
statement such as using(var foo = new MyObject()) { }
.And in your finalizer, you call
Dispose
, just in case the calling code forgot to dispose of you.#post
#challenge
💻 Perfect Number | #easy
Create a function that tests whether or not an integer is a perfect number. A perfect number is a number that can be written as the sum of its factors, (equal to sum of its proper divisors) excluding the number itself.
For example, 6 is a perfect number, since 1 + 2 + 3 = 6, where 1, 2, and 3 are all factors of 6. Similarly, 28 is a perfect number, since 1 + 2 + 4 + 7 + 14 = 28.
Examples:
#interview
💻 Perfect Number | #easy
Create a function that tests whether or not an integer is a perfect number. A perfect number is a number that can be written as the sum of its factors, (equal to sum of its proper divisors) excluding the number itself.
For example, 6 is a perfect number, since 1 + 2 + 3 = 6, where 1, 2, and 3 are all factors of 6. Similarly, 28 is a perfect number, since 1 + 2 + 4 + 7 + 14 = 28.
Examples:
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
#interview
📝 What are Property Accessors?
The get and set portions or blocks of a property are called accessors.
These are useful to restrict the accessibility of a property.
🔸 The set accessor specifies that we can assign a value to a private field in a property and without the set accessor property it is like a read-only field.
🔸 By the get accessor we can access the value of the private field. A Get accessor specifies that we can access the value of a field publicly.
#post
The get and set portions or blocks of a property are called accessors.
These are useful to restrict the accessibility of a property.
🔸 The set accessor specifies that we can assign a value to a private field in a property and without the set accessor property it is like a read-only field.
🔸 By the get accessor we can access the value of the private field. A Get accessor specifies that we can access the value of a field publicly.
#post
What will be the output of the following code snippet?
Anonymous Quiz
47%
40, 25000, 50000
6%
40, 25000, 25000
11%
40, 50000, 50000
36%
Error