Questions tagged as 'c#'

1
answer

Syntactic sugar? [closed]

I came across these days with the term syntactic sugar, when I was studying the use of await and async in C #. This question explains what is syntactic sugar or syntax sugar What is syntax sugar and how does it work? . In addit...
asked by 27.05.2015 / 21:16
1
answer

GridView with one line only - Asp.Net C #

I have a column in the GridView with Schedules, I made a schematic that picks up such a time at such an hour for example: 8:00 to 8:30 and so goes to other lines. In all, until 6:00 p.m., it gives 20 lines. How do I put this all in one line? Som...
asked by 26.05.2015 / 14:33
1
answer

FtpWebResponse.GetResponseStream returning an HTML

I'm doing an FTP connection, with FtpWebResponse c # . So far so good, I'm listing the directories as this answer . When I simulate an FTP server locally with FileZilla Server included in XAMPP, I make the directory listing and it co...
asked by 27.05.2015 / 19:37
1
answer

Player's lifeless method does not work

I'm doing a script to take life out of the player when something collides with it, I've reviewed the code dozens of times and can not find the error. The collision code is tied to enemies: PlayerHealth ph; public int danoAtaque = 10; v...
asked by 26.05.2015 / 21:51
2
answers

Store decimal value

I'm trying to get a value from a typed textbox with a dot, and save it with dot in decimal, if you type 10.80, and then to store 10.8 in my variable. I tried the following: decimal valorTotal = Convert.ToDecimal(hfValor.Value.Replace(".", "...
asked by 20.04.2015 / 20:12
2
answers

Select does not return anything

I have the following method: public DataTable Select(bool all = true, string campos = null) { if (all && campos == null) _sql.Append("SELECT * FROM "); else _sql.Append("SELECT " + campos + " FROM "); _sql.A...
asked by 02.01.2015 / 14:03
1
answer

Multiple config files on different projects ASPNET MVC

I have a problem and maybe someone can help me. I'm working on a ASPNET MVC project so I've structured the solution into multiple projects to break down the different components. In my main project web.config file (for example PR...
asked by 23.01.2015 / 14:51
1
answer

Play YouTube videos in a Windows Phone application

Hello, I'm creating an application for Windows Phone 8 / 8.1 programming in C #, one of the features will be the ability to watch youtube videos, but I could not make it work using MediaElement. Is there another way to do it? Thank you.     
asked by 29.01.2015 / 13:56
1
answer

How to add a Label inside a TextBlock by code behind

How do I add these Labels within TextBlock , code behind ? <TextBlock> <Label x:Name="NumeroPergunta" FontWeight="Bold" /> <Label x:Name="Pergunta" /> </TextBlock> What I have so far: var...
asked by 24.12.2014 / 12:17
1
answer

TextBox and C # + ASP.NET Dynamic Button

I'm feeding a webform with textboxes and buttons from a repeater, according to the tuples (people table) returned in an SQL query, linking the code to specific attributes within those controls. For the textbox I'm using the hidden attribute, whi...
asked by 23.12.2014 / 17:47