Questions tagged as 'c#'

1
answer

File txt does not store the path of another txt

What I try to do is create 2 files in the system, one where the user can choose where he wants to save his database file where all the records of his products will be stored. The other file txt would be created without the user's permissi...
asked by 27.11.2018 / 17:39
2
answers

rounding with specific decimals c #

Hi, I would like to see if you can help me. I want to round a value with 2 decimals but at a point value. for example, if the decimal value is between 0 and 0.49, it remains at 0.50 if the decimal value is between 0.51 and 0.99 goes to the ne...
asked by 17.09.2018 / 19:19
2
answers

Modify variables from one form to another

I have a problem and when I modify a tag or tag of a parent form tag from a child form, when I close the child form, the variable or tag of the parent form goes to the previous value, as if it were not I had modified. What I do is call the co...
asked by 12.07.2018 / 09:08
2
answers

Is there an "Imports System.Console" (VB.NET) in C #?

I would like to know if there is something like a using System.Console in C # . I wanted to do something in the console to remember. When I learned to use the console, I did it with the VB.NET language. There you could import the na...
asked by 12.11.2016 / 15:05
1
answer

How to pass an ArrayList from one class to a method within another Class?

I need to use a ArrayList object object that I have in a class, in one method that I have in another. The files within the project are separate and I have inside one, a function that works on the attributes of the objects within the Ar...
asked by 16.05.2018 / 15:02
3
answers

C # Help with static variables

I do not have much experience with C # and Forms but I have a problem with static variables. I need a static int variable to define the size of a static array. Public partial class Form1 : Form { public Form1() { In...
asked by 28.09.2018 / 01:41
2
answers

Know if there is a number within a variable

In a variable I keep a number that is in my Oracle DB can be 236578898 but I just need to know if it brings the 2365 to perform an operation, account1 is where I keep the number if (int.Parse(cuenta1) == 2365) { //int valor1 = Int.Parse(TB...
asked by 10.08.2018 / 15:10
1
answer

Center the view on a word you have searched in a textbox

I have 2 textbox, in one position and I show a text and in the other I enter a word, I look for it and I highlight it in the text. The texts are very long and not all, so that part of the text does not appear (use a scrollbar). I want to know if...
asked by 22.11.2017 / 10:08
1
answer

Object reference error

When filling a list in a ViewModel, I get the error:    Reference to object not established as an instance of an object. The ViewModel is this: public class vmMovimientosParking { public vmMovimientosParking() { List...
asked by 29.08.2016 / 11:05
3
answers

Save date type value in SQL on en-US server

I am trying to save a string of type date in a field of the database, but when I try to save a date whose day exceeds day 12, it returns the following error:    String was not recognized as a valid DateTime. I tried to for...
asked by 09.09.2016 / 13:28