Questions tagged as 'c#'

1
answer

Doubt in inheritance c # [duplicate]

I have a conceptual question about inheritance, where I have a student and at some point this student will become an employee and this employee he was born in the system as a student and if everything is ok during the process will become an em...
asked by 27.07.2018 / 12:50
1
answer

How can I make an if if DataBase data is True or False

How can I do an if checking if the data in a column in the DataBase table is True or False? For example: using (SqlCommand cmd = new SqlCommand($"SELECT LoginID,Award FROM Sys_Usuarios_Award WHERE LoginID={login.LoginId} and Award='true ou...
asked by 12.03.2018 / 14:45
1
answer

C # - Pass only numbers in a currency formatted field

I have an application that shows me in a textbox the value of a course enrollment: string mensalidade = string.Format("{0:C}", Convert.ToDouble(leitura["Mensalidade"])); cursoSelecionado.Mensalidade = mensalidade; tb_Mensalidade.Text = Convert...
asked by 13.03.2018 / 23:16
2
answers

Go to next instruction - C #

I have if and need to be in case it is true it gives the message below and soon after it pauses the system or continues in another statement. I left the word BREAK to exemplify where I need this encoding (but BREAK do...
asked by 25.05.2018 / 22:17
1
answer

Can you make DropDownList "readonly" equal to TextField [closed]

I understand that DropDownList is already readonly , since I can not change the values of the options, however I need to maintain the uniform behavior of the screen. In query mode I can assign a readonly to TextBox and the te...
asked by 10.01.2017 / 15:44
3
answers

DateTime does not update in Console.WriteLine [closed]

When I click the button, something is written to the Console along with the date, but the time does not update. Code: private void button2_Click(object sender, EventArgs e) { Console.WriteLine("{0}", data.ToString("HH:mm:ss:...
asked by 24.09.2017 / 16:39
1
answer

Open system32 programs by C # [closed]

I am trying to run Active Directory from my machine via C #. I can open all other common programs with no problem. The program is installed in C:\Windows\system32\dsa.msc , however Visual Studio shows an error and informs that did not fin...
asked by 28.09.2017 / 22:15
1
answer

Turning float or double into date within a lambda

In the BD it has a field with a float value, which is actually the number of days from the 28/12/1800 date, which the Clarion programming language stores. Well, I have a REST service that is consumed by an Android App. What happens is that I...
asked by 11.09.2017 / 17:27
1
answer

How to format a Label using StringFormat in Xamarin Forms

I'm creating a solution where I should display an integer in a <Label /> . To do this I'm using the code below: public partial class Home : ContentPage { public Home() { InitializeComponent(); BindingContext =...
asked by 09.10.2018 / 16:42
1
answer

How to get the value of an Odata JSON object and convert it to string?

After accessing WCF, I get the following response: { "odata.metadata": "http://luiz-note64/WcfOper/WcfOperDataService.svc/$metadata#Operacoes&$select=IdOperacao", "value": [ { "IdOperacao": "4234340" }...
asked by 09.10.2015 / 22:27