implement Pseudocode code without return in c# [closed]
how can i implement this Pseudocode without return in c#(because i want to use it in button event handler)?thanks
edited:
large_int example(large_int u,large_int v)
{
.
.
.////some codes
.
x=u divide 10^2;
w=v divide 10^2;
return example(x,w)///it means when example(x,w) returns, x replace with u and w replace with v
}
You could pass in a variable that has to be set within the method.
MSDN on C# out keyword
You could make the method void, perform the same logic, and update something on your UI based on the result of the operation.
Not sure if you mean for ASP.NET, but if you do...
<asp:Button ID="myButton" Text="Do Stuff" runat="server" OnClick="My_Event_Method" />
protected void My_Event_Method(object sender, EventArgs e)
{
example(someArg, someArg2);
}
private void example(int u, int v)
{
// perform logic here and update your UI
}
精彩评论