Questions tagged as '.net'

2
answers

How to fix this error "Can not convert from 'int' to 'char []'

Why is this error displayed? I believe the logic is right.     
asked by 07.10.2017 / 23:04
4
answers

Difference between two dates, ignoring weekend - working days only [duplicate]

I was looking for something similar, but unfortunately I did not find anything. I found this solution that helped me a lot but it's in Java. How to calculate the difference between two dates by ignoring the weekends in Java without using l...
asked by 14.06.2016 / 19:04
4
answers

Check if user is logged in

I would like to know how to block access when the user is not logged into the system, however, the only page that can be accessed is the Login page and when it tries to access any other page it redirects to the login page, user to log on to the...
asked by 25.08.2015 / 15:23
2
answers

How do I convert an enum type to list?

Is there any way to convert a Enum to List ? public enum TiposHospedagem { Casa = 1, Hotel = 2, Pousada = 3, CasaCampo = 4 } I'm trying to get enum and add to the list, but foreach does not want to...
asked by 31.08.2016 / 17:13
2
answers

Difference between BackgroundWorker and Task.Run

Generally when I had to do some operation in background , mainly involving progress bar update or labels I used BackgroundWorker , with its events WorkerReportsProgress and DoWork . Recently I came across the source of a...
asked by 31.10.2016 / 17:48
4
answers

SQL Embedded in C #

I have a C # application that uses a MySQL database with Entity Framework. However, the size of the database is ridiculously small, so I do not think it's worth having a MySQL database server just to run this application. What approach would...
asked by 02.09.2016 / 14:35
2
answers

How to protect a decompilation assembly?

Nowadays there are a lot of changers and recompilers for .NET Framework, the guy goes there, makes an application and everyone who has a decompiler (for example IL Spy) can go there, select the Assembly and see all the source code of the applica...
asked by 10.03.2016 / 20:09
1
answer

Is it possible for a program to modify its own code?

I was developing an artificial intelligence program with neural networks, but what always made me embarrassed is that every time I open the program, it will have to repeat the whole course of learning to achieve the same result as before. My...
asked by 08.07.2017 / 23:33
2
answers

Know if the application was terminated by the task manager

Is my application aware that it is being terminated by the task manager? If the user is to terminate my application through the task manager, does my application detect this completion and perform some tasks before it is finished? Does any...
asked by 08.07.2015 / 18:30
1
answer

How to find the term X of the Fibonacci sequence?

I have to make a program in C # that receives a% number of% that will be the term of the sequence and print it on the screen.     
asked by 16.03.2015 / 00:23