Questions tagged as 'c#'

1
answer

Why does this retyped code not work the same as the original?

I'm studying C ++ a short time and I want to train rewriting functions already done by me in C # only in C ++. I wrote a simple code that calculates a IV of a hash, very simple even, calling the same methods using the same argument in...
asked by 21.12.2017 / 23:03
2
answers

Alternative to Session

I am using Session to store the company object that the user is logged in. I also use to make filters, so he can only see what is the company's login. However, I have the following problems: 1 - If the user has closed the tab, his authe...
asked by 26.11.2014 / 12:40
2
answers

Lambda expression to return a Person in the repository - DDD and Aspnet.Core [duplicate]

I have a Person table that has one-to-one relationship with tables PessoaFisica and PessoaJuridica .    WhenIpasstheid,ithastocheckmewhetherthenatureisphysicalorlegalandbringmetheperson+pessoafisicaorpessoajuridica(Thepersonca...
asked by 27.02.2018 / 00:12
1
answer

Do not update a certain EF field asp.net mvc

I have a table that every time I create a new register has the field Datacadastro, but when I want to edit I do not want to change the date that was registered and only changes the other fields. I already tried to do it in a way by logic works b...
asked by 09.02.2018 / 21:35
1
answer

How to get the exact value of the division with the decimals after the comma? [duplicate]

I need to do a percentage calculation, but I am not able to recover the exact value. Example: int valorUni = 8; int valorTotal = 116; double result; result = (valorUni / valorTotal) * 100; //Resultado esperado: 7,547169811320755 //Resu...
asked by 08.11.2018 / 14:08
1
answer

How to use a concrete class method created from an interface?

In the Lawyer class, I've implemented all of the properties and methods of the IPessoaFisica Interface, and a few other methods and methods of the Lawyer class , such as Advocate () and Oab. How do I access this method? Being that in cre...
asked by 18.09.2016 / 20:12
1
answer

How to transfer from one ComboBox to another (C #)

The idea is, there is a Main ComboBox, each with a client of 4 different cities, I wanted to select a client in the ComboBox, push the button and remove from that ComboBox and insert in the corresponding city of it. In short: I want to take an...
asked by 25.03.2018 / 06:23
1
answer

Deserialization XML

I have a method that does a query to a WebService, with the return I do a deserialization of the XML received. It turns out that if I do the deserialization in memory it gives an error saying:    xmlns="http://www.portalfiscal.inf.br/nfe" not...
asked by 18.08.2016 / 22:54
1
answer

XSD For Class C # Enum

I'm generating a class with XSD.EXE from a schema. I am summarizing the posting only the part of the schema that generates the enum that I doubt. <xs:simpleType name="TCodUfIBGE"> <xs:annotation> <xs:documentation>...
asked by 21.09.2016 / 16:41
2
answers

How to put a button in a textarea in ASP.NET, C #?

Good. I have the following sketch of a contact form made in wix.com but I wanted to put it also in my asp.net project. Sofar,itlookslikethis: Mycodeisasfollows:<body><style>textarea,input{border:2pxsolidrgba(7,143,27,1);padding:5px1...
asked by 22.05.2018 / 17:25