c# - About .net and winRT -


i'm used code in .net i'm kinda new winrt , have couple of questions:

  1. when create metro windows store app in c# using winrt , subset of .net windows store apps, managed application? (hosted clr?) or unmanaged , .net part mapped winrt.
  2. what happens when there reference windowsrt component written in c# unmanaged language c++? makes use of clr or 100% native?

is managed application?

a winrt app runs out-of-process com server. large parts of code use unmanaged, use in xaml example written in c++. implementation detail pretty hard see, has been wrapped language projection built clr. makes winrt interop managed classes. not unlike way can add reference com component , managed code well.

for practical purposes can call app managed app , you'll use managed debugger fix bugs.

it makes use of clr or 100% native?

native c++ 100% native. same scenario in reverse if write winrt component in c# , used in c++ or javascript app, apps have no idea wrote code in c#. com that's underneath it, universal glue microsoft uses allow different languages talk each other. clr takes care of interop, if write add-in office app or use microsoft.office.interop.excel automate excel.

note how .winmd file pivotal bridge gap, exact equivalent of com type library or .net metadata tells compiler interfaces in language-independent way. visible in of restrictions when write own winrt component, class needs sealed since com not support implementation inheritance. , cannot generic. , can expose datetimeoffset not datetime, etcetera.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -