Questions tagged as 'c#'

2
answers

How to count words from a string ignoring prepositions?

Is there a service that recognizes if a certain type of word is a preposition? I want to make a word ranking of a feeder rss , but ignoring prepositions. Ignoring words with less than N characters is a good start, but maybe not enough, as...
asked by 24.02.2015 / 18:30
3
answers

Deploy queues for WebSocket

I am developing a WebSocket server that will control multi client connections, it will basically work as a chat, it will be a kind of multiplayer game , after many searches and some tests I realized that when using Socket for mess...
asked by 03.04.2014 / 15:31
1
answer

Fill Data Grid View with property of objects

I have a form where I need to fill a DataGridView with the data of a list of users. To generate this data, I used 3 classes: User Class namespace TesteDataGridView { public class Usuario { public int id { get; set; }...
asked by 13.05.2014 / 13:43
1
answer

Why iteration of a list with anonymous object works with array but does not work with ListObject?

I tried the following iteration with C #: var objects = List<Object>{ new {Id = 2, Nome = "Wallace"}, new {Id = 4, Nome = "Cigano"} }; foreach (var user in objects) { Console.WriteLine ("Meu id é {0}"...
asked by 14.06.2016 / 20:45
1
answer

How, when and why to use "SecureString" in C #?

I once heard about the C # SecureString class and found it interesting, so I think it's interesting content that can yield good answers from more experienced professionals. Some questions to ask might be: Someone has worked with this cla...
asked by 09.11.2016 / 18:06
1
answer

How do you know if the sum of two double's will give greater than the limit of a double?

Is there any way to know if a sum between two values in the format double will exceed the limit of the variable double ? Example with integer: 2147483648 + 1. In this case it goes beyond the limit of an integer, I do not know if...
asked by 19.10.2016 / 10:40
1
answer

How to drag form without border?

I'm trying to implement a way to drag my form without a border when I click and hold the left mouse button on it, but I did not succeed. Here is an example of my attempt to implement. 1 ° I created the% and%% variables as global within the%...
asked by 06.11.2015 / 01:59
1
answer

Download image from server memory

I have an Asp.Net MVC project where I generate an image in memory and would like to download it. See a snippet of code: Image imagem = default(Image); using (Bitmap b = new Bitmap(bitmapWidth, bitmapHeight)) { using (Graphics g = Graph...
asked by 01.12.2015 / 18:52
1
answer

Find slow point in .Net code

I need to parse a code that is taking too long to execute, the method code is extensive and makes several calls to other methods, I've been debugging to try to identify the slow point, but this is very difficult . Does Visual Studio have any...
asked by 14.01.2016 / 12:14
1
answer

How to automatically fill fields when saving object to bank

I have a system, in ASP.NET MVC that implements an audit form, that when a user inserts or updates an object in the database, some information is saved in an audit table automatically. The interface, which I want to implement is: pub...
asked by 02.12.2016 / 00:54