Questions tagged as 'c#'

1
answer

Query using LINQ and Generics C # [closed]

I'm having trouble running a LINQ query using Generics. Something like: from x in session.Query<T>() " ??? " My method receives two strings as parameters, columnName and search value. public virtual object PesquisePorColunaValor(...
asked by 22.09.2015 / 20:42
2
answers

Error changing static property value

I have my class DadosConexao , this class is responsible for saving the connection string of the database, it contains the following properties: A statistical property StringConexao . isServ indicates whether it is a...
asked by 18.10.2015 / 01:01
2
answers

manipulating DataTables.net data with Json [how to manipulate json to display img in column]

I'm putting together a table with the JS framework DataTables I process the data via Server-side through JSON In the first column I would like to display a photo, the name of this photo comes via JSON. How to do it? Example of...
asked by 19.10.2015 / 20:29
1
answer

How to append query in a DataGridView?

I was able to Inserts and Updates . I've downloaded this file: using System; using System.Collections.Generic; using System.Linq; using System.Text; using MySql.Data.MySqlClient; using System.Data; namespace MySQLClass { //Do...
asked by 20.10.2015 / 19:51
3
answers

Problem in breaking a String

I have a string that is concatenated inside a loop , I wanted a new line with the concatenated values to be created for each loop . Here is the code I'm using: mensagem =""; for (int i = 0; i < titulosReceber.Rows.Count; i++) men...
asked by 05.08.2015 / 15:19
2
answers

How to display the contents of a queue?

I say this because I already created the Queue: Queue<string> Fila = new Queue<string>(); But I can not display it, string Pedido = (("Cliente:") + Cliente + (Environment.NewLine + "Produto:") + Produto + (Environm...
asked by 29.05.2015 / 04:22
1
answer

Serialize / Deserialize DateTime

I'm saving to a text file a serialized object that only contains fields of type DateTime, but the date is saving wrong. I'll demonstrate with an example what I'm doing. My DataBaseViewModel object contains two fields of type DateTime [Se...
asked by 09.11.2015 / 19:45
2
answers

@ Html.ActionLink and Url.Action are not taking the route of the controller annotation

I have the following method in the control: [Route("video/categoria/{categoria}/{page?}/{sort?}")] public async Task<ActionResult> Index(string categoria, int? page, string sort) { ... } My RouteConfig.cs: public static void Regis...
asked by 07.11.2015 / 02:05
1
answer

How to make the weapon disappear on the same key that makes it appear in UNITY

using UnityEngine; using System.Collections; public class SelecteArma : MonoBehaviour { public bool Equipamento = true; void Start () { } void Update () { if (Input.GetKeyDown ("1")) { selecionarArma (0);...
asked by 20.05.2015 / 16:12
1
answer

Get path from the desktop

Good, last week I put a question here: Automatically save to a default folder C # I have now created another form, and I want it in Load to automatically fetch the file from the Desktop. But I can not put the code below, because if the p...
asked by 22.05.2015 / 12:38