Questions tagged as 'c#'

1
answer

Error 'does not exist' when searching for specified path file

I have the following code to check if a file exists in a specified path but it always returns to me as it does not exist. I have looked at the file permissions and it is all correct. if ( System.IO.File.Exists("C:\Temp\test.txt")) { //Hago u...
asked by 20.08.2018 / 10:13
1
answer

Select the first 7 elements of an enum and display them in a Combobox using datasource

I have an enum that, public enum Region { euw, na, br, lan, ru, oce, tr, jap, } The thing is that I would like to show the first 7 elements, or what is the same, all except the last one. Currently with comboBox1.DataSource = Enum.GetVa...
asked by 13.08.2018 / 07:59
1
answer

Is it possible to create a single installer for two applications? [closed]

veran: I have an application developed in C #, and the client needs that every time someone enters data in a table, the system shows an alert (that is resolved), create a second project only for alerts. My question is whether it is possible to c...
asked by 23.08.2018 / 17:08
1
answer

MySql (RDS Amazon aws) does not connect from anywhere, only my pc

I have a login made in c #, which connects to a database, the database is Amazon Aws, and connects perfectly, at least from my IP, The problem is that it is not accessible from any computer with different IP. I am aware that it is the configu...
asked by 21.10.2018 / 01:41
1
answer

How to validate text boxes, which only supports numbers

I have 3 text boxes where I should only enter numbers and if a letter is written simply do not show it, as if I had not typed it. For Windows forms private void TBCausacion_KeyPress(object sender, KeyPressEventArgs e) { }     
asked by 14.08.2018 / 22:32
1
answer

Change highlight color in MenuStrip items

I am working with C # in which I will develop an application that contains a menu which can be dynamic. I chose to work with MenuStrip, it's the first time I've done it. I want to make my menu bar black with the blank font. I doubt it is how...
asked by 15.08.2018 / 21:57
1
answer

Open an Excel file from an ASP.NET form

Hello friends, I'm getting an excel like HttpRequestPostedFileBase from a form of Asp.NET , but I need to open it, I know I can store the file and send it to me    Workbook sheet = excel.Workbooks.Open ("path / file.xls"); The path o...
asked by 16.08.2018 / 15:58
1
answer

How can I filter data with dates in C #?

In a form I have two datetimePicker, and I want to filter the data using the dates of the datetimePicker, but it does not work out. Can you tell me what I'm wrong with? I'm programming in three layer model, I leave my code. BUSINESS LAYER (BU...
asked by 07.08.2018 / 17:17
1
answer

Xamarin forms Only the original thread that created a view hierarchy can touch its views

Hello friends, I am receiving this error,    Android.Util.AndroidRuntimeException: Only the original thread that created a view of the hierarchy can touch its views. After implementing the following in my code public Comenatrios(i...
asked by 07.08.2018 / 22:56
2
answers

Error Converting a JSON-type string to Class in C #

I am building a Web Api in c # Where in one of the operations I return a string that serialized like this: public string GetCliente() { string resultado = string.Empty; DataTable dt = new DataTable();...
asked by 07.08.2018 / 00:18