Questions tagged as 'c#'

2
answers

Serialize to JSON with C #

I'm trying to serialize an object that carries internally other objects with different properties, but when creating the file it only shows me the main attributes nombre y ubicacion , instead it does not appear dispositivo , which is...
asked by 26.06.2018 / 18:56
0
answers

Xamarin UITest iOS: Unable to contact test backend running in app. A common cause is that the app is not properly linked with Calabash

I have a problem when running UITests for iOS applications with Xamarin. I clarify that Android apps run perfectly. I work with a Cross-Platform project, giving the appropriate configuration in AppInitializer.cs When executing the t...
asked by 02.12.2016 / 12:36
0
answers

The socket is disconnected (C #)

I am trying to make a DLL in .NET (C #) that contains the functions to connect to a TCP server. The client class is the following: public class SynchronousSocketClient { public static Socket ConnectToNotificationsServer(string serverName,...
asked by 02.12.2016 / 09:29
1
answer

How to implement Find, FindAll, ForEach in iList as ListT. C #

Premise is for a development in Unity3D with C # I have a serialized class called Tool. namespace Game.Data{ [Serializable] public sealed class Tool { public int id; public string name; } } From another clas...
asked by 01.09.2017 / 11:26
3
answers

what is the equivalent of lblconteo.Text = Len (txtMessage.Text); in c #?

I have this method to count the number of characters typed and it is in Visual Basic lblconteo.Text = Len(txtMensaje.Text); as you would in c #?     
asked by 20.10.2017 / 17:13
1
answer

why does not it return all the rows in the gridView?

Testing this method when in a gridview with checkbox if 1 checkbox is selected, then a modal with that selection is displayed in another gridview, and if 2 or more checkboxes are selected in the first gridview, the selected rows in another gridv...
asked by 30.10.2017 / 13:52
1
answer

How to count the times a string is repeated in another string in C #?

I have a string, for example: string cadena = "ABABBA"; and I want to know how many times the letter A is repeated next to the letter B , in the example I put in it I should result in 4 . I had thought to use a for to traverse the...
asked by 02.03.2018 / 20:38
3
answers

Hide cmd console to my program in C # with Visual Studio

So far I have been able to change certain aspects from the console, but not hide it, so that it does not appear. I mean I have a program in console mode, but I do not want to visualize the cmd anymore, how could I make it so that the console CM...
asked by 10.11.2016 / 18:47
2
answers

Concatenate text files with c #?

I have an exercise in which they ask me to concatenate the content of the first and second text files through a function, saving the content in the first file, this is what I have done so far, but it does not work for me, ideas? using System;...
asked by 15.05.2017 / 20:06
4
answers

how to perform percentage calculations in c #

I need a line of code that I want to use in the keypress event of a textbox. You have to make when the user press enter perform: txtcompra * txtganancia (%)+ txtcompra txtventa.tostring(); the calculation would be something like that f...
asked by 13.06.2017 / 16:16