A simple question regarding C# code logic

myndeswx

Client
Регистрация
15.05.2017
Сообщения
436
Благодарностей
104
Баллы
43
Hello, I am sure it can be done easier, and my code just always get's very complicated and hard to work with,
for example in this code I have 3 exactly same blocks that get's data from database, and let's say my database address changes, or some field changes, I have to change it in all the 3 blocks.
So the question is - how to create 1 block of data (like a function?) that I could use in all other C# blocks, thank you!
74524
 

myndeswx

Client
Регистрация
15.05.2017
Сообщения
436
Благодарностей
104
Баллы
43
Thank you, looks like just what I need, trying to understand how to use it now : D
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)