Questions tagged as '.net'

1
answer

How to obey the Open / Closed principle in this situation?

I have a situation where the solution I identified clearly violates the Open / Closed principle and I would like to find a better solution that does not violate this principle. Obviously my concern is not simply to "obey the principle" but rathe...
asked by 31.03.2017 / 18:19
1
answer

Error in index and ListBox

This is my code: public static ListBox listBox1 = new ListBox(); Form2.Globals.listBox1.Items.Add(Form2.Globals.din); Form2.Globals.listBox1.Items.Add(Form2.Globals.dequi); Form2.Globals.listBox1.Items.Add(Form2.Globals.demer); Form2.Glob...
asked by 07.12.2016 / 15:53
1
answer

N for N Entity Framework

Dear, I'm trying to make a N to N relationship in the Entity Framework for the tables described below. Atthemomentwhatishappeningisacyclicalredundancy,whereeverytimeIopenaGroup[x].GroupUser[x]atthispointIcaneithergobacktoGroupandfollowUser,a...
asked by 16.12.2016 / 01:54
1
answer

Universal Apps 8.1 on Windows 10

Does Windows 10 have backward compatibility with Universal Apps for Windows 8.1? That is, applications written in for Windows 8.1 run on Windows 10?     
asked by 19.12.2016 / 22:25
2
answers

Include all child objects (navigation properies) in entity search

I wonder if it is possible to fetch the fully populated object without having to call include by specifying each child object (with their respective children) in my class. Currently, I'm doing this: dbContext.Ocorrencia.Include("Pe...
asked by 17.03.2017 / 23:08
1
answer

Inaccessible Error logs: Security

Good afternoon, recently I've been getting the following error    The source was not found, but some or all event logs could not be   searched. To create the source, you need permission to read all event   logs to make sure that the new sourc...
asked by 26.10.2016 / 18:36
1
answer

Run 2 querys or more

I would like to execute 2 queries in C # when the button is clicked, but I can only execute one. public static void excluireventos() { string connectionString = Conn.tank(); using (SqlConnection connection = new SqlConnection(connect...
asked by 15.11.2016 / 21:35
1
answer

What are StaticResources and DynamicResources in WPF?

When I use resources in WPF, I can specify them as StaticResource , as DyanamicResource . However, most of the time only one works, and the other would start an exception. From this point, I have the following doubts: What i...
asked by 24.12.2016 / 19:00
2
answers

I need to get the Task Manager process description

I need to get the name of the process that is active on the screen, however I need to bring the same one appears in the Task Manager in description. For example if I use processName it will bring "Chrome" I need it to be description =...
asked by 23.05.2016 / 15:56
1
answer

Set time zone for the entire project

I recently hosted an application on a North American server, so the dates are outside the Brazilian timezone. This way, I would like to know if there is a way to set the time zone only once so that every time you use DateTime.Now in a var...
asked by 18.07.2016 / 15:05