C#ref指针搞糊涂了 [英] C# ref pointer confused
问题描述
对不起要问一个新的问题..
目前我正在使用第三方成像处理图像处理程序(用c#编写)图书馆。我正处于想要从图像缓冲区获取数据的地方。
我正在调用成像库的功能来获取< br $>
functioncall(adressplz,ref address);
ok,现在我通过引用获得了地址。
指针如何指向此地址,并从中获取值? div class =h2_lin>解决方案
functioncall(adressplz,ref address);
sorry for asking maybe a newbish question..
currently i''m working on a image processing program (written in c#), using an 3rd party imaging library. I''m at a point where i want to get data from an imagebuffer.
i''m calling a function of the imaging library to get an andress by
functioncall(adressplz, ref address);
ok, now i got the address by reference.
How can a pointer point at this address, and get the value back from it ??
functioncall(adressplz, ref address);
That simply means that parameteraddress
is passed by reference, that is it may be changed by the called function. See the documentation[^] for details.
这篇关于C#ref指针搞糊涂了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!