मुझे कुछ कोड को संकलित करना पड़ा और मुझे नहीं पता कि यह वाक्यविन्यास क्या है? क्या आप मदद कर सकते हैं, या मुझे इसके बारे में लिखने के लिए इंगित कर सकते हैं? मैंने गुमराह किया है और इस साइट की खोज की है और कुछ भी नहीं मिला।ऑब्जेक्ट प्रकार के अंत में एम्परसेंड कैरेक्टर क्या है?
बस कोड की एक पंक्ति:
Rectangle pageBounds;
// ISSUE: explicit reference operation
// ISSUE: variable of a reference type
Rectangle& local = @pageBounds;
"&" आयत ऑब्जेक्ट प्रकार के अंत में प्रतीक, और pageBounds चर से पहले "@" क्या है?
यह कोड की मेरी आखिरी पंक्ति है जिसे मुझे फिर से संकलित करने के लिए निष्पादन योग्य करने के लिए ठीक करने की आवश्यकता है।
यहां इस विधि का उपयोग करने वाली विधि है, क्या मैं इसे हटाने से दूर हो सकता हूं?
protected override void OnPrintPage(PrintPageEventArgs e)
{
Application.DoEvents();
++this._pageNum;
float num1;
if (this.Header != null)
{
num1 = this.Header.CalculateHeight(this, e.Graphics);
this.Header.Draw(this, (float) e.MarginBounds.Top, e.Graphics, e.MarginBounds);
}
else
num1 = 0.0f;
float num2;
if (this.Footer != null)
{
num2 = this.Footer.CalculateHeight(this, e.Graphics);
this.Footer.Draw(this, (float) e.MarginBounds.Bottom - num2, e.Graphics, e.MarginBounds);
}
else
num2 = 0.0f;
Rectangle pageBounds;
// ISSUE: explicit reference operation
// ISSUE: variable of a reference type
Rectangle& local = @pageBounds;
int left = e.MarginBounds.Left;
Rectangle marginBounds = e.MarginBounds;
int y = (int) ((double) marginBounds.Top + (double) num1);
marginBounds = e.MarginBounds;
int width = marginBounds.Width;
marginBounds = e.MarginBounds;
int height = (int) ((double) marginBounds.Height - (double) num2 - (double) num1);
// ISSUE: explicit reference operation
local = new Rectangle(left, y, width, height);
float yPos = (float) pageBounds.Top;
bool flag = false;
int num3 = 0;
while (this._printIndex < this._printElements.Count)
{
PrintElement printElement = (PrintElement) this._printElements[this._printIndex];
float num4 = printElement.CalculateHeight(this, e.Graphics);
if ((double) yPos + (double) num4 > (double) pageBounds.Bottom && num3 != 0)
{
flag = true;
break;
}
else
{
printElement.Draw(this, yPos, e.Graphics, pageBounds);
yPos += num4;
++this._printIndex;
++num3;
}
}
e.HasMorePages = flag;
}
संदर्भ के बारे में पढ़ें और पॉइंटर्स – Tschallacka
@ माइकल डिबेट्स: यह सी # है ... – Ryan
सी # में संदर्भ, पॉइंटर्स, * और * वैल्यू टी है ypes;) –