Questions tagged as 'c#'

1
answer

Help in randomized variable comparison

I'm making a game of colors, in it I have a random that randomizes buttons in a certain sequence. The value of these buttons are concatenated in the X variable that sets my particular sequence. ex: botão1 = "1"; botão2 = "2"; bot...
asked by 29.11.2014 / 20:16
1
answer

Update MemoryStream when replacing BookMark

I'm doing a RESTFUL service in C # that has a byte array of a WORD document, and in that document I need to replace the existing bookmarks with text that are also passed in the method. Problem : When replacing bookmarks with the appr...
asked by 23.10.2014 / 19:44
1
answer

Concatenate aps.net expressions with literal text

I have this expression: <asp:Label Text='<%# Eval("Analista") %>' runat="server" /><br /> The result is Approved or Disapproved. I would like to add the following word: by: In which the end result would be: Approved / D...
asked by 15.01.2015 / 17:17
1
answer

Problem getting very large JSON in WebService RestFul

We work here on the company with Android + WebService (.Net RestFul) for data communication. We are getting the data in JSON format in a method, below: //Método public Retorno MetodoA(string sConexao, string sBanco, string sImeiDispositivo,...
asked by 20.01.2015 / 12:16
1
answer

Get name of worksheets that contain an excel file with C #

I have a problem with getting the name of the worksheets that have to be in an Excel file. I need to read a file that contains several spreadsheets, and I would like to get all the names and list them in a ComboBox . Example: In thi...
asked by 18.01.2015 / 13:30
1
answer

How do I delete this method

I can not call the methods: DeleteOnSubmit and also method: DeleteObject . See below my code and how I make a delete in it. public static void deletaRuptura(int _idmotivo) { RupturaEntities db = new RupturaEnti...
asked by 30.09.2014 / 13:27
1
answer

Doubt with Tipada View?

I have the following: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using PostGetModel.Models; namespace PostGetModel.Controllers { public class HomeController : Controller...
asked by 30.09.2014 / 19:49
1
answer

Thread hanging

My system has a method that puts each triggered event into a thread , save, edit, search, everything goes to a thread . backgroundWorker.DoWork += acaoProcessamento; backgroundWorker.RunWorkerCompleted += (s, a) => { this.oc...
asked by 29.09.2014 / 21:54
2
answers

Abstract unit tests

I have a problem when using abstract classes to keep my code common to my tests, initialization, shutdown etc ... I use a concrete class just to initialize the variables. The inherited code of the abstract class does not run when running the tes...
asked by 30.09.2014 / 15:36
1
answer

How to return data from a WebService in XML format?

I'm using an example webservice, but it's generating me an error stating that "Response 'does not exist in the current context," does anyone know what could be wrong?    NOTE: The error runs at compile time: Response.Write(resultado...
asked by 21.10.2014 / 15:17