Questions tagged as 'c#'

0
answers

How to return the difference of a matrix in C # without using LINQ? [closed]

I have an array A and B: Method: public static int[] RetornaDiferenca(int[] a, int[] b) {... } Calling the method: RetornaDiferença(new int[] {1, 2, 2}, new int[] {2}) The result would have to be: new int[] {1} because all it...
asked by 24.10.2017 / 12:09
1
answer

Passing array list per parameter

I have the following problem: I need to pass some files (xmls and pdf) from my winforms application to a webservice. The problem is that you can not pass via parameters to a WS data type such as List < >. In this case, I'm going t...
asked by 26.09.2017 / 15:21
0
answers

How to edit data from a table in a modal bootstrap?

How to load a modal bootstrap through a link within a < td > tag and send together the Code , Name and Date > example: jquery: $(document).on("click", "#lnkEditar", function () { $('#cadModal').modal('show'); });...
asked by 27.09.2017 / 02:10
0
answers

How to encrypt a file using C #?

I need to create a function to encrypt files using the Caeser method without using the functions already done in the C # library. My code does not work for large files the computer crashes: public static void cesar(string origem, string destin...
asked by 06.09.2017 / 20:31
0
answers

Good practices for using Blocks Try / Catch [closed]

What is the best strategy for using Try / Catch blocks: try { //FAÇA ALGO } catch(Exception ex){ //LOGAR O ERRO //LANÇAR O ERRO PARA CIMA? } Example: A tax calculation operation initiates the process by the UI triggering a one-bu...
asked by 07.09.2017 / 15:09
1
answer

Call PUT method of an App xamarin.forms

I need to update my App . I'm having some questions about passing the parameters to the URL of the service and running PUT . The service is working, testing by Postman, I can perform the Update, so it's only missing App . My difficu...
asked by 18.09.2017 / 20:24
1
answer

How to perform sum by row in a datagridview in C #

Good afternoon, I need a help, I have a datagridview that contains a column of Currency type and a column of total Currency. In the Currency Type column I can have up to 3 types of currency, euro currency, dollar currency and real currency. Now...
asked by 18.09.2017 / 21:02
0
answers

Problem using LabelFor Razor MVC 3 + C #

I have the following error in my View : when I pass @class="classe boot-strap" is not used, even passing View inside parameter @class it insists on using 'text-box single-line' , code snippets. Code Razor...
asked by 18.09.2017 / 21:51
1
answer

How to create a list where it lists all the existing items within an order

I have the following screen that generates when placing an order. In the Order Items field, I need to separate by items and not cluster in one. Example as it is currently exiting You are only bringing one line In case you would like to l...
asked by 18.09.2017 / 21:14
1
answer

Problem with conversion from string to decimal C #

Hello, I'm having a problem converting from string to decimal, as the following code demonstrates: string valor = "0,01"; CultureInfo _provider = new CultureInfo("pt-BR"); decimal valorTratado = Convert.ToDecimal(valor, _provider); The vari...
asked by 04.09.2017 / 05:17