Questions tagged as 'c#'

2
answers

How to access a private static array from another class?

private static List<Receta> _recetas = new List<Receta> { //contenido array }; public List<Receta> GetRecetas() { return _recetas; } This is the code if I have a Get method but how do I access it from another class w...
asked by 12.07.2018 / 20:48
1
answer

How to break down an entire amount into bills of different numbers?

Write the "bankruptcy breakdown" method that requests an integer value and returns the corresponding amount of tickets. The tickets used are: $ 1, $ 5, $ 10, $ 20, $ 50, $ 100 Example: amount = 157 {$ 100 (1), $ 50 (1), $ 5 (1), $ 1 (2)} This...
asked by 25.02.2018 / 02:35
3
answers

Program to calculate powers using while in C # (Windows Form)

I have to do a program that calculates the powers of the numbers entered by the user. The problem is that I have to do it using the while cycle and I really do not know what my condition must be inside the while. Any suggestions?     
asked by 25.09.2018 / 01:20
1
answer

How to increase the value of a number in a textbox?

I have this code private void mas_Click(object sender, EventArgs e) { bpm++; bpm_textbox.Text = bpm.ToString(); } but I want to directly increase the string without having to convert from integer to string, since I...
asked by 08.05.2018 / 19:09
4
answers

What is Convert.ToSingle for? [closed]

I am reviewing an algorithm already created, to understand how to make a function that returns the average of three notes, but I would like to know what it does with the conver.tosingle promedio = Convert.ToSingle((nota1 * 0.35) + (nota2 * 0.3...
asked by 31.08.2017 / 13:17
1
answer

asp.net mvc why can not I create a Session [""] in a class? [closed]

I find a big unknown and it is that it does not allow me to create a Session[""] in a class file only in a controller file. Does anyone know what this is about or how could I create one there?     
asked by 10.05.2018 / 18:47
1
answer

Help in programming module and variable increment

I want to make a program that introduces a series of notes and once this in another part in a module that adds +1 for each suspended note and shows me the number of people who suspended, once all the notes are inserted. He tells me only the l...
asked by 27.03.2018 / 17:27
0
answers

Compare letters in two string [closed]

The task is to compare two string and take a percentage according to the similarity. A serious example String palabra1 = "Hola Mundo"; String palabra2 = "ola mudo" should show me in console the letters that does not contain word2...
asked by 14.12.2017 / 13:58
1
answer

Save Questionnaire (C #) in Word or in SQL server

I have the following questionnaire, which I did in C #, it is a test that is done to new people. What I would like to do would be to save the entire document in Word, say to have a backup of each person who performs the test, so you can...
asked by 27.06.2018 / 17:45
1
answer

How to deserialize a JSON in C # with the following structure?

A web service returns this JSON, which I set in a variable: [{ "PO": "", "Status": "S", "Message": "OK WO : 000144439642 has been held in KIT1", "Process": "HOLD (OTM_TRIGGER)", "Auxiliary": "000144439642", "TicketNumber": "...
asked by 15.11.2018 / 18:14