Questions tagged as '.net'

1
answer

I can not fill an array

When I put fixed values in the array size I can fill it up, but when I try to capture the values in arrays a message like this appears:    The index was outside the bounds of the array ' int a = 0, b = 0; double[ , ] test = n...
asked by 13.10.2018 / 16:43
1
answer

Problems when referencing a classlibrary of .net framework core - C #

I need to reference a .NET class library in my WPF layer which is a .NET Framework layer. But it bursts a compilation error saying that it can not be referenced. The error message is:    The project "ProjectName.csproj" is destined 'ne...
asked by 10.01.2018 / 09:45
2
answers

How to assign a class to the whole and not only the attributes separately?

I have a class constructor method that when called makes a query in another database class that returns me the same class as the constructor method ( only with assigned data ), eg public Invoice(int id) { CallDB db = new CallDB(); Invoic...
asked by 29.12.2017 / 13:41
1
answer

Show photo of a listbox item gives me error Out Of Memory

I am making a tool that transforms a photo upload by the user into bytes array then compares those bytes with the photos in the database I was able to make the code work but when in the end it detected something the same or similar then i...
asked by 26.12.2017 / 15:40
1
answer

Convert double to string keeping the same format

I need to convert a value of type double to string in C #, without this value being changed to scientific notation. My code is: double valor1 = 0.000024746578864525161; string resultado = Convert.toString(valor1); My outpu...
asked by 15.06.2018 / 15:01
1
answer

Show window without frameworks

How can I display a window without using frameworks ? For example, display the console window or another without .NET and other frameworks .     
asked by 30.11.2017 / 16:31
1
answer

Error creating XML with XmlWriter

I need to create an XML, but when I try to create 2 elements of the error, how do I generate 1 XML with two elements? follow my code class Program { static void Main(string[] args) { using (XmlWriter writer = XmlWriter.Create(...
asked by 20.08.2018 / 21:20
3
answers

How do I access the elements of a declared list in a different class?

I've developed code that generates a list when the following input data is entered: Size of the list (or how many " Indexes") The values that will populate the " Indexes ". Values are collected within a method entered in the public...
asked by 03.11.2017 / 22:58
1
answer

How to handle an index range exception?

I have an exception problem in my program and I'm not sure how to handle it. The error image in the DataGridView follows. privatevoidDGW_solictacao_CellClick(objectsender,DataGridViewCellEventArgse){DataGridViewRowrow=this.DGW_solictacao....
asked by 11.10.2017 / 15:26
1
answer

Is there any way to compare all received parameters?

I have the following method public Boolean Teste(String nome, String telefone, String...) { if(!string.IsNullOrWhiteSpace(nome) || !string.IsNullOrWhiteSpace(telefone)...) {} } Is there a way to compare all of these received values in a...
asked by 23.01.2018 / 18:08