Questions tagged as 'c#'

2
answers

How do I know the name of ActionResult that called the view?

I wonder if it's possible to get the name of ActionResult that called View . I know that View normally has the same name as ActionResult , but in my case, I have a single view for two ActionResult different, henc...
asked by 28.06.2014 / 16:21
2
answers

Display decimal places (Currency) is rounding

I have an application where the price should go in int format without decimals. int Valor = (int)(produto.Valor * 100); //o produto.Valor é um decimal The problem is when I want to display this value in View For products like 0....
asked by 12.04.2016 / 18:41
2
answers

applicationx-www-form-urlencoded with HttpWebRequest

I am making a system to authenticate the Token (derived from the credit card) next to Cielo. This token has special characters like + Cielo receives the data via XML. I made the following code to send: private String sendHttpRequest...
asked by 05.04.2016 / 18:20
1
answer

Import Excel to Sql Server C #

I need to import a excel file into a SQL table. However, I need to pick up the lines and go through them, since it will not be all the information I will get from excel. I have exactly what I need but get TXT file, but the informat...
asked by 05.04.2016 / 21:26
1
answer

How does SqlBulkCopy work?

I am using the SqlBulkCopy class for do the bulk data insertion. Everything has worked perfectly, but in recommending this to my co-workers, while proving efficiency, they questioned how it works. In my searches, I could see that S...
asked by 06.06.2016 / 19:06
1
answer

What are Mutexes and when is it advisable to use this feature?

I read about Mutexes and the class Mutex . However, I can not clearly understand what Mutex really is and what this class does. Being that I would like to know if I can use this feature to prevent my desktop application from running more t...
asked by 15.10.2018 / 16:24
2
answers

HttpStatusCode class does not exist code 207, 208 and 226

What to do when the HttpStatusCode class does not exist the 207 , 208 and 226 Someone already asked the question in GitHub: link , it seems to me that they did not do an "update". Here is the code: HttpResponseMessage response =...
asked by 04.09.2018 / 17:39
1
answer

How to Configure Mapping Entity Framework 1: N Using Inheritance

I have two classes: Pessoa and Usuario . The Usuario class inherits the properties and methods of the Pessoa class. I'm using the Entity Framework and I believe you're doing the wrong mapping. So the problem is happ...
asked by 13.02.2017 / 15:57
2
answers

Difference between Find, Exists and Contains of ListT class

I'm working with the class List<T> , so I came across some search methods, if I may call it that: Find ; Exists ; Contains ; I was wondering what the difference was between them, so I searched the Micr...
asked by 18.05.2017 / 20:01
1
answer

Python integration with C #

Is there any way to integrate C # and Python 3? I need to create a graphical application quickly and practically. Currently, I have the Python scripts running 100%, now what I need is to take the inputs from the terminal and play in a visu...
asked by 12.05.2017 / 22:18