| Author |
Message |
evgeny
Joined: 20 Feb 2011 Posts: 5
|
Posted: Mon Feb 21, 2011 12:20 am Post subject: Invalid object initializer generated in C# and VB.NET |
|
|
When decompiling WaIISHost.exe from Windows Azure SDK 1.3 Reflector 7 beta 3 and beta 4 both generate the following code:
| Code: |
setup = new AppDomainSetup {
ApplicationName = "RoleManager",
ApplicationBase = directoryName,
PrivateBinPath = setup.ApplicationBase
};
|
This fails to compile:
| Quote: |
| error CS0165: Use of unassigned local variable 'setup' |
The code should not use an object initializer in this case:
| Code: |
setup = new AppDomainSetup();
setup.ApplicationName = "RoleManager";
setup.ApplicationBase = directoryName;
setup.PrivateBinPath = setup.ApplicationBase;
|
|
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group