Questions tagged as 'c#'

1
answer

How to check if a Font is already installed

I have a C # program that checks whether a font is already installed or not, but it is not working right: I'm trying with the following code if (File.Exists(@"C:\Windwos\Fonts\Agency FB")) Would anyone know how I can verify b...
asked by 19.11.2014 / 13:24
2
answers

How to use reflection on a COM object?

I'm trying to do a reflection in a program, however, at the time of picking the object type (which is needed for reflection) is returning "System .__ COMObject", and this is not useful. The method I tried was the following: Type tipo = sim...
asked by 10.09.2014 / 20:18
2
answers

Is there a late reading class in the .Net framework?

I would like to know if there is any class in .Net that allows me to tell it how to read a data, but that DO NOT read immediately ... only later when requested, this class it reads and stores the value, in case several readings are taken. S...
asked by 31.01.2014 / 22:26
2
answers

How to register .net dll using Inno Setup

I have a DLL written in C # and I can not register it using Inno Setup. An example of how to run this process would be useful.     
asked by 10.02.2014 / 11:16
1
answer

Find list elements with partial strings

I have a List<string> that receives the phone number of all the contacts in the phone, until then without problem, but I want to perform operations with the elements of this list, but I have some problems. An example of a possibl...
asked by 24.09.2015 / 06:38
2
answers

What is #pragma c # [duplicate]

While maintaining a code in a web service I came across the following code snippet: #pragma warning disable 1591 When searching for its meaning, I did not find anything in Portuguese that was easily accessible. Question What is...
asked by 06.06.2017 / 19:34
1
answer

How to extract and compress files with System.IO.Compression.ZipArchive in C #?

I'm starting in C #. I saw that it has the class System.IO.Compression.ZipArchive to work with zip files. I have some doubts: How do I unzip an existing zip through ZipArchive? How do I compress to an existing zip file? That i...
asked by 19.07.2017 / 16:45
4
answers

Ignore class name in XML serialization

I need to serialize a class to XML, for example: public class Pessoa { public string nome { get; set; } public int idade { get; set; } public Endereco endereco { get; set; } } public class Endereco { public string logradouro {...
asked by 02.06.2017 / 17:43
3
answers

ASP.NET MVC5 - Asynchronous Methods on the Controller

I'm developing an MVC layer for an ASP.NET system written initially in WebForms. It does not use EntityFramework, so a good part of the system I had to work out a homemade solution. In order to use Ajax's asynchronous methods with the MVC5 Co...
asked by 26.02.2014 / 20:14
4
answers

Convert string to Time

I have a column in the database that receives a type varchar that corresponds to the hours in my application ( "HH:MM" ). I need to convert this string to a type TIME and then concatenate it with a type DateTime . Ha...
asked by 14.04.2014 / 16:52