Questions tagged as 'c#'

1
answer

How to return value to a DateTimePicker? W#

I want to return data from a DataGridView to a DataTimePicker so I can change this data and save it again, but I'm having a hard time doing this because DataTimePicker does not accept value type. private void btnAlterar_Cl...
asked by 10.11.2016 / 18:23
1
answer

Not In Linq Sql Entity Framework

I need to do this search, but it displays the error:    ambiguous invocation. public List<Notification> Get(List<UserVisualization> item) { return db.Notifications.Select(o=> o.EntityId).Where(o => !item.Contains(o.En...
asked by 10.11.2016 / 19:12
1
answer

Problem inserting into table in Postgresql

When I'm going to make a INSERT : INSERT INTO categoria (cat_descricao,cat_status) VALUES ('não' ,'1' ) by passing some element with accentuation the following error occurs    ERROR: 22021: invalid byte sequence for encoding "UTF8"...
asked by 14.12.2016 / 14:09
1
answer

Additional information: This row already belongs to this table.

I'm developing a system that looks for information in an excel and does some processing to save the data in a DBF database. All the treatments I do are on top of DataTables, so I use dataRows and after a certain time, I'm facing many problems wi...
asked by 15.08.2016 / 17:14
1
answer

What is the difference between Exception.Message and Exception.ToString ()?

I have already read some answers regarding try-catch and Exception s, but I still have doubts about the difference in Exception.Message and Exception.ToString() : What's the difference between one and the other?...
asked by 08.08.2016 / 14:39
1
answer

C # AES Cryptography with MD5

I'm doing a college job where I need to encrypt a string with AES and Md5. When I do the encryption, it returns the normal result (I think), but when I go to decrypt, it returns the following error:    CryptographicException : The input d...
asked by 23.11.2017 / 15:36
1
answer

How is SecureString encrypted and stored?

The SecureString class is used to represent text that must be kept confidential in memory (passwords, card numbers, balances, and so on), and performs its correct deletion from memory when that text is no longer necessary. How is this...
asked by 22.11.2017 / 14:40
1
answer

Null attribute check in @ Html.DisplayNameFor

I need to check if the attribute of a class is null. If it is null, I would like to hide your label. Here's an example of how it's being viewed today: TheDataFinalizacaoattributewasnull,soitwouldnotdisplayitslabel.BelowisthestructureoftheHTM...
asked by 13.09.2016 / 19:50
1
answer

Write Return Json to txt file c #

I'm trying to write a return from a JSON into a txt file. But when I try to use DeserializeObject it gives error. I have Json below (example 2 records): [ { "TipoVeiculo": "Caminhão", "CodigoMarca": 501, "Marca": "AGRAL...
asked by 11.07.2016 / 19:55
1
answer

C # Digital Certificate A3 CPF Token

I have to put a digital certificate of type CPF A3 token with password in an HttpWebRequest, so I was trying to use the X509Certificate2, as follows: private X509Certificate2 GetCert(string CertFile, string CertPass) { FileStre...
asked by 30.06.2016 / 22:14