1

Topic: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

There is large enough library (the order of 300 500 various classes), written on #. I want to use a small piece of its functionality in the program on With ++. Therefore now to me such decision sees: to understand library and to transform the code necessary to me in With ++.
That I should make - the first to study difference C# from With ++. There are any books or  from harm corporation "as With ++ to the programmer to pass to a nayward to #"? They Should somehow the first adherents ...

2

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

AlekseySQL;
At you the purpose slightly another, at all of them of the book about that as all will be abruptly if you use ours C#
High lights:
Litter
, at the beginning use smarts everywhere where you can
Take the project and cut yet there will be no minimum of that that is necessary
Conduct the console application for the test on C# and analog on a C ++ that it would be possible to debug on the same data
You will see what free-lock containers, at once translate in locking variants

3

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

wrote:

and I studied only With ++

, on  handed over a maximum.
Except pair paradigms (the HZ and ) - corresponds almost in a forehead (in this side)

4

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

From books esteem Richter " CLR via C# "
At a rewriting the principal problem will be in garbage collection which is not present in With ++. Any classes.NET to which do not have analogs in With ++ probably get.
PS the Code on C# can be caused from the code on With ++.

5

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

Siemargl wrote:

, on  handed over a maximum.

C smile

Siemargl wrote:

except pair paradigms (the HZ and ) - corresponds almost in a forehead (in this side)

What means "in a forehead"? The logical differences mean few, therefore one constructions are simply replaced with others?

6

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

Dima T wrote:

At a rewriting the principal problem will be in garbage collection which is not present in With ++. Any classes.NET to which do not have analogs in With ++ probably get.

Never understood problems with garbage collection: if objects to create at that level of a procedural stack where they are really necessary they automatically die at an output from function. If at us objects form somewhere more low on a stack and "jump out" upwards as lines of a snuffbox it is the code - noodles: the program cannot be divided into layers and each of them to read separately. In other words, it is necessary to observe obvious patterns of programming simply.

7

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

AlekseySQL;
Objects not only on a stack are allocated but also in a heap.
In c# - all in a heap

8

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

wrote:

AlekseySQL;
Objects not only on a stack are allocated but also in a heap.
In c# - all in a heap

And what for you in a heap allocate them? If at you objects form at that level of a stack where they really start to be used downwards on a stack they perfectly are transferred by links. If at you a rare occurence, when more low on a stack you change object entirely (instead of values of its fields) and consequently use pointers in this rare occurence it is possible to cause delete in the end of function (where this object has been created). But it happens o-o-very rarely at usage of the correct patterns of programming.

9

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

On Internet open spaces found amusing video: [youtube=n7MoclODHDk]

10

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

AlekseySQL wrote:

it is passed...
And what for you in a heap allocate them? If at you objects form at that level of a stack where they really start to be used downwards on a stack they perfectly are transferred by links. If at you a rare occurence, when more low on a stack you change object entirely (instead of values of its fields) and consequently use pointers in this rare occurence it is possible to cause delete in the end of function (where this object has been created). But it happens o-o-very rarely at usage of the correct patterns of programming.

aha, rarely... - the first more or less   with a heap of objects or  shows to you how much pound is dashing

11

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

kealon (Ruslan) wrote:

aha, rarely... - the first more or less   with a heap of objects or  shows to you how much pound is dashing

At me multi-threaded application with GUI on Qt. Any zoo of pointers did not meet.
Certainly I use them (for example, wrote the two-dimensional vector), but all operation with pointers goes in classes, and the primary goal (where the procedural stack is torn) uses references. Such simple pattern of programming completely removes questions of operation with storage.

12

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

AlekseySQL wrote:

it is passed...
At me multi-threaded application with GUI on Qt. Any zoo of pointers did not meet.
Certainly I use them (for example, wrote the two-dimensional vector), but all operation with pointers goes in classes, and the primary goal (where the procedural stack is torn) uses references. Such simple pattern of programming completely removes questions of operation with storage.

All is true, but here in  so not always works - after the function end  time of sweep of local objects
It I advise to esteem - about everyones ,

13

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

AlekseySQL, you like ready the code  gathered. If so what sense to consider where objects to create? As there it is written, with that and it is necessary to understand.

14

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

Dima T wrote:

AlekseySQL, you like ready the code  gathered. If so what sense to consider where objects to create? As there it is written, with that and it is necessary to understand.

Head at me not only that in it to eat.
By the way, found interesting article from Hohljandii with different ratings of programming languages: https://dou.ua/lenta/articles/language-rating-jan-2017/

15

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

AlekseySQL wrote:

By the way, found interesting article from Hohljandii with different ratings of programming languages

Ratings have what relation to your task?

16

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

wrote:

it is passed...
Ratings have what relation to your task?

Expand an outlook, certainly!

17

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

I do not see any problem to understand with library on other .
Once for a long time, when knew only Delphi (and it is sensitive) it was necessary to understand with library on With ++. Any problems did not arise.
If it is necessary to understand ready I do not see the reason for doubts.

18

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

Addx wrote:

when knew only Delphi (and it is sensitive it was necessary to understand with library on With ++. Any problems did not arise

It is slightly another. At c ++ except syntax and hardly  (in something - hardly smaller) kol-va features in OOP and still which in what actually are not present the basic differences from . Well and objects it is possible in a stack, likely the core. If about language.
And there - only classes, all - only objects. Not clearly (at least a beginner) when deleted (and whether deleted). Silent horror.

19

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

YuRock wrote:

Silent horror.

I do not see problems if at least minimum to understand operation

20

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

wrote:

I do not see problems if at least minimum to understand operation

To start to program on C# - yes. Problems are not present. And here to translate the code on C# to hand-operated language storage is and to the programmer having experience both with C# and from a C ++,  will be. Bluntly many attentions it is required. And if something from this in eyes did not see - that even more difficultly.

21

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

It is possible a spacer on controlled c ++ to write or entirely library on controlled with ++ to transfer;
But the same trouble - to understand that do it is necessary

22

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

AlekseySQL wrote:

it is passed...
Head at me not only that in it to eat.
By the way, found interesting article from Hohljandii with different ratings of programming languages: https://dou.ua/lenta/articles/language-rating-jan-2017/

What for to read inscriptions on fences, the rating is better to look using TIOBE, and separately the taken country not the most good index

AlekseySQL wrote:

There is large enough library (the order of 300 500 various classes), written on #. I want to use a small piece of its functionality in the program on With ++. Therefore now to me such decision sees: to understand library and to transform the code necessary to me in With ++.

Most likely, it not the most good decision as the probability of is high that losses on time will considerably above expected result. Understand it is better and write anew. By the way, why you do not want to add API to library on C#? Too small piece is necessary to you or it works not so quickly how you would like?

23

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

I will simply leave it here
MSCOREE.DLL
https://msdn.microsoft.com/en-us/library/9x0wh2z3.aspx

24

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

wrote:

the source code on # Got to me, and I studied only With ++. There is a fast method to be cut?

The same problem.
Is to steam of plug-ins to Notepad ++ written on . It would be desirable to rewrite and add

25

Re: The source code on # got to me, and I studied only With ++. There is a fast method to be cut?

trdm _ wrote:

it is passed...
The same problem.
Is to steam of plug-ins to Notepad ++ written on . It would be desirable to rewrite and add

And who hinders?