Questions tagged as 'c#'

1
answer

Adaptive Storyboard (WPF)

I have an animation in my WPF project and wanted to know if you have the Storyboard to be responsive. As in the settings of Margin and Height / Width are responsive marking the option auto wanted to know if you have how to do this auto style...
asked by 03.10.2017 / 01:39
1
answer

Error reading text file line by line

I'm trying to read a very large file line by line and adding to a list, however when it arrives at a certain point I get an error: System.OutOfMemoryException Is there any way to read this whole file in one go? while ((line = trPlace...
asked by 30.09.2017 / 20:25
1
answer

Go through Arraylist from object objects and compare them to C #

I was wondering how I can reuse the object that I put in an array list because I can not compare it to anything, and how do I compare an object that is inside it with another, in that college program the goal was to user to put the number of sha...
asked by 17.10.2017 / 12:05
2
answers

TextBoxFor with whitespace

I have a TextBoxFor that lists the record of a table field. When displaying in the view, the textbox throws whitespace after displaying the contents of the record. I noticed that these spaces are to complete the StringLegth defined in the model...
asked by 18.10.2017 / 13:19
1
answer

How to repeat number at a maximum?

I have two integers: n and m : n : Number that will repeat in the index; m : Index maximum. What I need to do is simple, is to return a number that is <= m based on n . When n is greater...
asked by 09.10.2017 / 20:22
1
answer

add lambda expression column

I need to return the sum of the business_value column, I have the following expression dynamic contato = (from a in context.Negocio join cli in context.Pessoa on a.id_cliente equals cli.id_pessoa join col...
asked by 02.11.2017 / 13:48
1
answer

Play value of a grid that is in form to another grid in another form C # windows form

Hello, I'm here with one more situation requesting help because I have not yet found it in the searches.  I have a form that I put a Gridview in the form has button to open another form of query and when I click on an item from the list it adds...
asked by 02.11.2017 / 01:23
1
answer

Filtering result by category

using (ObjectContext ctx = new ObjectContext("name=kinectEntities")) { ctx.DefaultContainerName = "kinectEntities"; ObjectSet<produtos> query = ctx.CreateObjectSet<produtos>(); foreach (produtos r in query) {...
asked by 14.09.2017 / 21:36
1
answer

Add MySQL Connector to the install package

I have a Windows Forms that connects to a remote MySQL database (it's on a server). Basically, all it does is read data from a table, neither write nor anything. I'm using the Entity Framework and my project has the following dependencies f...
asked by 14.09.2017 / 15:45
1
answer

ASP.NET path does not receive the parameter in Action after being configured

I mapped a new route on my site like this: routes.MapRoute( "PaymentEdit", "Payment/{type}", new { controller = "Contributor", action = "Payment" }, new { type = UrlParameter.Optional } ); My...
asked by 18.08.2017 / 16:06