Trouble with static methods calling eachother c# -
i'm trying replace messagebox.show calls in applicaiton i've created static msgbox class 2 methods defined below:
(one)
public static messageboxresult show(window owner, string messageboxtext, string caption = "", messageboxbutton button = messageboxbutton.ok, messageboximage icon = messageboximage.none, messageboxresult defaultresult = messageboxresult.none)
and 1 calls other
(two)
public static messageboxresult show(string messageboxtext, string caption = "", messageboxbutton button = messageboxbutton.ok, messageboximage icon = messageboximage.none, messageboxresult defaultresult = messageboxresult.none) { return show(application.current.mainwindow, messageboxtext, caption, button, icon, defaultresult); }
so issue if call first 1 directly, no problems, works. if call second 1 nothing happens.
is there i'm not understanding how works?
the .show overloaded method used display whatever type of messagebox desire. returning .show not being applied messagebox, need take returned value , use messagebox.show(whateverreturned)
Comments
Post a Comment