In short, why should I bother with the description of the property setter, if I can stupidly conclude everything without it and process it through exceptions or in a special separate method
How do I imagine the properties work based on the description: as for properties, it is a way to encapsulate how data is assigned and retrieved from a finite field. I have a situation where I would like to hide how a value is assigned to a field. That is, the description is no more than 20...
By calling an exception, then I will have to enclose this code in a try-catch block. I would like to avoid using exception capture. I thought it was possible to solve this problem somehow through the property.
Hello everyone. Let's imagine a situation that I have a class inside which there is a property. The property does not equate the value of a variable if the length of the incoming value is greater than the specified condition.
public class Book
{
string bookDescription = null...
Good afternoon. I need to make a query that outputs the authors of books sorted by the number of books in decreasing order. You only need to output authors whose number of books is greater than the average number of books by authors. A sample of my table, in which I managed to get only the...
Hi! I want to master this small library and I have the following question. I have implemented:
Domain
namespace MediatrDemo.Domain
{
public class Client
{
public int ID { get; set; }
public string Name { get; set; }
public string OtherInfo { get; set; }
}
}...
as i understand it, this is due to the fact that textblock in this particular case sees the string as an array of char. As I understand it, it will be better to use Observablecollection, but I'm so lazy to rewrite all this.
I have a class that describes the level of subordination of departments:
public class SeniorPosition : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
private string managementPositionName;
private string...
I have a more sophisticated algorithm for solving this problem that produces guaranteed correct numbers, but the problem is that it consumes too much RAM. For example, if you put 1 billion numbers in my current algorithm, you will need up to 10 GB of RAM and almost a day on a single core to...
If the current number is 2 times larger than the first number in the group, it is, and everything that follows it is guaranteed to go to the next group.
I was almost able to develop the correct algorithm, but it still produces repeating numbers:
for (int i = 2; i <= 6; i++)
{...
Hi. I need your help with a small logic problem. The essence of the task:
There are numbers from 1 to N, N = 50, you need to divide the numbers into several groups
so if one number is divided by another, then these numbers fall into different groups.
The result of this partition is M groups...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.