Click here to Skip to main content
13,146,739 members (90,499 online)


QuestionAnother conversion problem (Prism) Pin
Andy_L_J18-Nov-12 11:07
memberAndy_L_J18-Nov-12 11:07 
I am using Prism to handle IoC, I can do this in VB.NET:

<pre lang=VB">
Dim _regionManager As IRegion
Dim _container As IUnityContainer

Dim mainRegion As IRegion = _regionManager.Regions(RegionNames.MainRegion)
For Each v As View In mainRegion.Views
_regionManager.RegisterViewWithRegion(RegionNames.MainRegion, GetType(MaterialView)

I am getting the following eror: non-invocable member ....Regions cannot be used as a method.
When I use this C# conversion:
IRegion mainRegion = _regionManager.Regions(RegionNames.MainRegion);
for each(var v in mainRegion.Views)
_regionManager.RegisterViewWithRegion(RegionNames.MainRegion, typeof(MaterialView));

Some hints as to why would be very helpfull.
I don't speak Idiot - please talk slowly and clearly

"I have sexdaily. I mean dyslexia. Fcuk!"

Driven to the arms of Heineken by the wife

AnswerRe: Another conversion problem (Prism) Pin
Pete O'Hanlon18-Nov-12 11:39
protectorPete O'Hanlon18-Nov-12 11:39 
GeneralRe: Another conversion problem (Prism) Pin
Andy_L_J18-Nov-12 11:47
memberAndy_L_J18-Nov-12 11:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 22 Sep 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid