Questions tagged as '.net'

1
answer

Manage DataTable with lots of information

I have here a "small" problem with a DataTable . From a SQL query I'm getting a huge amount of records (> 1,000,000 ), and although the query is relatively fast, loading DataTable from Fill() is extremely slow and, in some...
asked by 31.08.2018 / 15:32
1
answer

Definition of non-generic method?

In public partial class frmAltInfo : Form The error occurs:    Extension method must be defined in non-generic static class I do not understand what can be and how to solve. Here was the error: public static string TextNoFormatt...
asked by 23.11.2014 / 23:32
3
answers

Generate 32-character MD5 password with CryptSharp

I am using the CryptSharp library to generate password in MD5. I had read that MD5 generates string with 32-character hexadecimal but is generating 34 and with several character types. Generating in this format:    $ 1 $ gSUz3sUo $ mFPQB05...
asked by 14.07.2014 / 16:51
3
answers

Copy file with progress

How do I use the function in C # File.Copy(string path); to copy a file by incrementing a value in a ProgressBar ?     
asked by 28.06.2014 / 03:33
1
answer

Conditional optimization

Is it possible to make a comparison (if equal to 1 or equal to null ) simpler than the one made in my code? @((Model.Visibilidade == 1 || Model.Visibilidade == null) ? "checked" : "")     
asked by 29.03.2017 / 14:49
2
answers

Find out if a control is a button

I have the following code to change the color of the buttons that are in a panel: private void mudaCorBotao(Button bt) { foreach(Control b in Panel_esq.Controls) { if (/*[O que devo colocar aqui?]*/) { b.Bac...
asked by 23.04.2017 / 01:43
1
answer

How to find out in what generation of garbage collector an object is allocated?

Considering my previous question or in> is it necessary to solve some kind of problem? In order for me to program correctly , do I need to know the generation in which an object is allocated?     
asked by 27.04.2017 / 20:25
1
answer

When and why to use the Obsolete attribute?

At least on the projects I worked with, I see no point in using the Obsolete " in methods that are no longer used. What I do, and I see people doing is removing or commenting codes that are no longer used / obsolete. When and why shoul...
asked by 11.02.2017 / 13:11
1
answer

Develop application compatible with Windows 10 and Windows 8

I'm working on an application that uses Windows Forms to develop its alpha version. Soon, we will start developing a more stable version of this system, and it was then that support platforms became the focus of our discussions. We have the d...
asked by 14.02.2017 / 14:23
2
answers

Convert string array to string in VB

I need to use SPLIT on a lot of data, but I need to convert the array string to string. I'm putting String () to get the string array variable, but VS keeps telling me that one-dimensional array can not be converted to string. Can anyone h...
asked by 28.04.2016 / 18:30