Questions tagged as 'c#'

1
answer

How to know if a string starts with certain characters

Does anyone know how I can know if a string starts with: for example ca if there is any function for this. Example: string cadena = "test"; string comienza = "te";     
asked by 24.10.2018 / 00:54
3
answers

SQL query to filter by date a Datetime without including the time

I have a query in sql that looks for some XML by date range, but I think that it is not returning results since the where is with the datetime and I only send the date .. Any suggestions? SELECT A.e_rfc,a.fecha as fecha,C.SupplierName ,A.folio...
asked by 27.08.2018 / 17:37
2
answers

How can I put together a predicate function when I have to choose between several options

I have a class public class TestClass { public int? a { get; set; } public int? b { get; set; } public TestClass(int _a, int _b) { a = _a; b = _b; } } And for this class, I generate a list with elements...
asked by 19.07.2018 / 19:02
1
answer

Connect server DB to desktop application in C #

I just finished my application which I developed in C # using windows forms, it is a desktop application, which works with a local database. The application will be installed in clothing stores outside the company. My question is: How can I c...
asked by 30.08.2018 / 01:53
3
answers

Scroll between components (TextBox and Buttons) using TAB

I have a Form made in C # with some buttons and TextBox, it is supposed that when I give the TAB key it is changed to the next component, be it a button or a text box, but sometimes it goes up to two or three components. I do not have a code...
asked by 26.07.2018 / 22:27
3
answers

How to know how much data my vector has saved in C #

int[] VectorImpar = new int[20]; The user types in the keyboard x number of data, now, what the user wants is to know how many data he wrote, try with: VectorImpar.legth() - > and this gives me is the value of the initial dimensio...
asked by 31.08.2017 / 00:10
3
answers

C #, 3 Layers, Windows Forms - Improve Performance

I need to fill out a datagridview with more than 7,000 records that I get through a method that returns a generic list of objects. My problem is that when I assign it to datagriview.DataSource = LN.ObtainAll () positions; through the load method...
asked by 16.07.2017 / 20:08
1
answer

Problem removing or modifying a node in XML

I have a project in which I manage an XML file with C # UWP. The problem is that when I delete or modify a node in the XML document, the space of that node is not deleted and it is under the root, causing me to get an error. I give an exam...
asked by 13.07.2017 / 13:35
2
answers

Error inserting in Mysql. There is already an open DataReader associated with this Connection which must be closed first

What I want is to make a simple INSERT in C #, but I get this error:    There is already an open DataReader associated with this Connection   which must be closed first. Code to be inserted: string QueryCon = "SELECT Id_Categoria...
asked by 23.03.2017 / 19:17
2
answers

C # convert Control to UIElement

How can I convert a Control to UIElement in Windows forms with c # ? I'm extracting Controls from FlowLayoutPanel with Controls but I want to convert them to UIElement     
asked by 24.12.2015 / 01:24