Posts by tiago costa • 135 points
8 posts
-
1
votes0
answers74
viewsQ: Does not align zeroed value to report c#
I have a report from Crystal Report C# on VS2015. In fields that are decimal when the value is reset the report exits with a blank space after the decimal places. When it’s not zero: | 100,00| When…
-
4
votes2
answers817
viewsQ: Check if string starts with number
I need to check if a string starts with numbers. I want to do this using Regex in c# public static class StringExtensao { public static bool ComecaComNumero(this string str) { if…
-
0
votes1
answer190
viewsQ: Xmlserializer generates empty file space before closing tag
I am using the following code to generate an xml: public bool SerializarObjeto(object o, string pathArquivo) { var xns = new XmlSerializerNamespaces(); XmlSerializer writer = new…
-
0
votes3
answers1689
viewsA: How to make visual form inheritance in Windows Forms?
In the case of form I find it much more elegant to use Event’s. Within the click events to perform an action in the base form you call the Event which are implemented in each inherited form:…
-
0
votes1
answer274
viewsA: Entity Framework Code First. How to generate two banks from two projects, with the second project using classes from the first
If you use [Notmapped] Migration ignores the relation, but the address property will always be null, you will have to load otherwise. public class Candidato { public virtual int IdEndereco { get;…
-
3
votes2
answers499
viewsA: How to add one more condition in a query using Linux?
var consultaVeiculo = (from e in dm.Tabela_SegVeiculos join r in dm.Tabela_VeiculoRefers on new { id = e.Modelo, verdadeiro = true } equals new { id = r.Cod_referencia, verdadeiro = r.Cod_referencia…
-
1
votes3
answers394
viewsA: Is it possible to add string Connection within a class?
You can use a string to insert the connection.. this would not be a good reason why to change the connection you would have to recompile the dll. minhaConexao = new…
-
1
votes0
answers1001
viewsQ: import methods from an unmanaged Bematech DLL c#
I need to use a dll provided by Bematech with functionalities of a non fiscal printer. The example they provided brings the following code: [DllImport("MP2032.dll")] public static extern int…