Questions tagged as 'c#'

1
answer

If you can run other undesirable lines [closed]

I want to make a program that allows you to manipulate and manage information about CDs that is stored in a text file. The file should save for each CD, author / group name, CD name, year of edit, publisher name, total time (in minutes) and n...
asked by 14.10.2016 / 18:29
1
answer

Improve the performance of a method with pointers

Here's the code working: string string_pick(string text, string tag, char caractere) { int index = text.IndexOf(tag); return text.Substring(index + tag.Length, text.IndexOf(caractere, index + tag.Length + 1) - (index + tag.Length)); }...
asked by 17.06.2016 / 01:20
2
answers

What is the correct syntax for using object orientation in C # using .NET Core? [closed]

I have to familiarize myself with implementation of object-oriented code in C # development. However, the materials I am learning assume that I have Windows and Visual Studio environment installed ( example ). When I search for material about it...
asked by 14.05.2017 / 16:44
1
answer

Hi, I was trying to construct the name of a TextBox through a string. TextBox + index [closed]

private void btnGravarNovosValores_Click_1(object sender, EventArgs e) { string descricao; string textBoxX; int i = 0; foreach (Object texto in lstTabelaProdutosPreco.Items) { descricao...
asked by 01.03.2018 / 12:12
2
answers

How to deserialize a json to int? [duplicate]

I have a test json to see if my implementation worked in my code: string json = @"{'ItemHome':[{'Texto':'111','Icone':'aaaa','Color':'aaaa'}, {'Texto':'111','Icone':'aaaa','Color':'aaaa'}, {'Texto':'111','Icone':'aaaa','Color':'aaaa'}, {'Num...
asked by 27.03.2017 / 19:52
2
answers

How to extend POCOs of the Entity Framework by encapsulating business rules?

I'm developing a 3 layer system. My initial intention was to expose the business layer entities to be used in the EF code first. I want to do this so that I can persist (in memory) entities so that they are managed by DbContext and do...
asked by 07.08.2015 / 19:05
1
answer

deserialize JSOn object

I am not able to underealise this object, public class itensjsonPai { public string resource { get; set; } public List<transaction> transaction { get; set; } } public class itensjsonfilho { public string id { get; set; }...
asked by 20.07.2018 / 16:43
1
answer

How do I get the MemberNames property with the index?

I started programming in C # a short time ago and I'm doing a validation treatment using Data Annotation with windows forms, I'm having a problem that I can not get the MemberNames property of the IEnumerable Interface by index, how can I get th...
asked by 25.08.2018 / 05:07
3
answers

Place spaces between letters of a text [closed]

Since a given string like "Something" has spaces between the letters, for example "A l g u m a C o i s a"; how do I do this in C #?     
asked by 26.08.2018 / 16:43
1
answer

What is the difference between class instance variables, automatic (local) and static duration?

What's the difference between these variable types? How to identify them? How does C # work with them?     
asked by 23.11.2017 / 22:12