<br><br><div class="gmail_quote">2008/7/6 Kevin Kofler <<a href="mailto:kevin.kofler@chello.at">kevin.kofler@chello.at</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Alex Lancaster <alexl <at> <a href="http://users.sourceforge.net" target="_blank">users.sourceforge.net</a>> writes:<br>
> error CS0136: A local variable named `result' cannot be declared in this<br>
> scope because it would give a different meaning to `result', which is already<br>
> used in a `method argument' scope to denote something else<br>
> generated/VolumeAdapter.cs(152,72): (Location of the symbol related to<br>
> previous error)<br>
<br>
</div>This error message says you have a variable in an inner scope shadowing a<br>
variable in an outer scope. This is allowed in "the programmer is always right"<br>
type languages like C or C++, but not in "let's try to prevent common mistakes<br>
by banning the constructs which cause them" type languages like Java or C#.<br>
(The potential mistake in this case is of course confusing the variables with<br>
the same name, i.e. trying to refer to the outer "result" variable and getting<br>
the inner one instead.)<br>
<br>
The obvious fix is of course to rename the local "result" variable to something<br>
non-conflicting. Given that this code appears to be automatically generated,<br>
the patch will probably have to be applied to the generator.</blockquote><div><br>The more disturbing thing, if I read the output correctly is that it happens while compiling gio-sharp.dll which definitely shouldn't be in f-spot. I haven't had time to take a stab at the offending code but it feels like it is including gnome-desktop-sharp stuff. In that case the correct fix would be making it use the system libraries. <br>
</div></div><br>