Questions tagged as 'c#'

3
answers

Get type of an entity framework property

Good morning, You would need to obtain, at run time, the corresponding property data type: foreach(string unaPropiedad in listColumnNames) { clsEntidad.getype().getproperty(unaPropiedad); PropertyInfo prop= prop.propertyType; Type...
asked by 23.08.2016 / 17:51
2
answers

How to recover all the GridFs files in MongoDB?

I have saved files in Mongodb using GridFs and C # but now I need to recover ALL the files I have saved in my database and store them in a folder. I hope you can advise me a little. Thanks This is the Code as I keep my files var connectionS...
asked by 22.11.2016 / 16:25
2
answers

Send the contents of an .eml file by email with c #

Would it be possible to send the content of an .eml file by email with c # without an attachment? I am currently sending messages with class MailMessage and I do not know if it would be possible to enter the content (with included phot...
asked by 18.01.2016 / 17:45
1
answer

Get the full name of a property

I am working on C #, using Linq Dynamic to do some sorting, so I was generated the need to obtain the names of the properties as string . When the properties are simple, they do not generate any conflict, since I can use nameof()...
asked by 22.11.2018 / 14:07
2
answers

ComboBox in DataGridView

I work in a Windows Forms app in which I have a DataGridView control in which one of its columns is of the Combobox type, I can populate the ComboBox without any problem. The problem I have is that I need the first element that contains the C...
asked by 20.07.2018 / 03:17
1
answer

Error serialize Json abstract class

I'm trying to send a list of abstract objects to% of signalr Server structure (where all values are generated); public abstract class Comida : Objeto { public int valorNutricional; public abstract void Comido(Cola jugador); }...
asked by 24.08.2018 / 10:54
1
answer

Help with a query in linq

I want to make a classification so to speak of a list that I have, I'm trying to do it with linq. well this is what I want .. Result. This the information with which I count. Proveedor: Videmont Cap. Morgan = $450.12 ET. Negra = $620.32 P...
asked by 27.06.2018 / 01:42
1
answer

Exclude a list of Strings in a table in C #?

Hello friend I have a problem with a table I have a field called names within this table and I have a list of names which I want to exclude from the table based on the name field. I have the following but it does not work for me. var DataRows...
asked by 26.07.2018 / 19:27
1
answer

How to trigger an event from one form in another

I am working with 2 forms, of which the first one acts as a floating box to collect data that is entered by the user. Once the data is entered, the user presses the Aplicar button to send the collected data to the second form, I want an e...
asked by 23.04.2018 / 07:30
1
answer

Pass variables and perform actions between classes in C #

I am learning the C # language, also using the VisualStudio tool, and I can not pass a variable (BtnColor in the code) from one class to another, and then perform an action from the value of that variable. This is the form I try to create in Vis...
asked by 25.08.2018 / 22:52