Questions tagged as 'c#'

2
answers

How to make a struct in C #?

How to make a structure in C # where you create a type? For example, in C ++ we use: struct teste { int a; char c[30]; };     
asked by 03.01.2016 / 02:41
3
answers

Find file having only part of its name in C #

I need to find a file automatically without having to open a check box for the user to select the file. Where I already have the directory of the folder where this file will stay and I also know the part of the final name of this file, and that...
asked by 28.10.2015 / 15:53
4
answers

Orable DB and MVC 4 - Connection Error (ORA-06413)

I have a dll that is responsible for performing queries in the database. In this dll , in the connection class, I have a method that opens the connection to the database and returns the connection, as seen below: private OracleCon...
asked by 13.10.2015 / 15:41
3
answers

Questions about relationship and mapping with Fluent API for EF 6

Whenever I have a class with properties that are of the type of other classes, which at the database level represents a foreign key, will I always need the navigation properties? And see this example: Revenda -> ClienteRevenda ->...
asked by 19.03.2014 / 18:43
2
answers

How do I leave a RadioButton marked as default?

I have several radioButton's. How do I leave a marked as default? private void radioButton2_CheckedChanged(object sender, EventArgs e) { comboBox4.Visible = false; comboBox5.Visible = false; comboBox6.Visible = false; comboB...
asked by 14.03.2014 / 22:21
3
answers

How to put a value that is saved in the database in a combobox?

I'm using C # Windows Forms with .NET 3.5. Insert all states of the federation within the property items of my combobox . When I seek a record saved my BD, the combobox assumes the value. For example, when I look for a record that conta...
asked by 31.01.2014 / 12:43
2
answers

Convert Date dd / mm / yyyy to ISO 8601 Format (yyyy-mm-dd)

I have a field called maskedTextBox2 in the C # Windows Form, which contains a date mask in dd/mm/aaaa format. How can I do to convert this string into aaaa-mm-dd format to save to MySQL database, which uses dates in ISO 8...
asked by 30.03.2014 / 21:59
2
answers

Calling generic methods in C #

I built a generic method that suits me well, but I'm having difficulty calling this method. public List<T> CriaLista<T>(params T[] pars) { List<T> lista = new List<T>(); foreach (T elem in par...
asked by 23.06.2017 / 02:56
1
answer

Store part of a string in a variable

I get the string below, through a response.StreamReader : 240144|000|5511946724649|2015-08-30 21:45:51|2015-08-30 21:46:02|1| How do I proceed to store the contents between the pipes each in a variable?     
asked by 02.09.2015 / 04:44
3
answers

Create FTP access to a virtual directory on Azure

I have a Web Application on Azure and created an internal folder as a virtual directory for an outsourced developer to deploy a contracted system. I'm having a hard time creating an FTP that only has access to the / commercial directory within t...
asked by 07.08.2015 / 15:16