M
M
magdest2018-11-21 20:06:17
C++ / C#
magdest, 2018-11-21 20:06:17

How to translate Task from C# to C++/CLI?

It is necessary to translate this into C++/CLI from C#:
//================================= ================================================
( C#)

System.Threading.Tasks; 

var tok1 = Task.Factory.StartNew( () =>          
{
/...
});
//====================================================================================
(C++)
( Загвоздка в (() =>))

  using namespace System::Threading::Tasks;

Task^ tok1 = Task::Factory->StartNew(    <----??????????????????????????????????????????????
        {
  /...
        });
//=====================================================================================

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dasha Tsiklauri, 2018-11-21
@dasha_programmist

these are lambda functions, how to work with them in C ++ 11 and above can be seen here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question