TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
B Oprit
1.3k
429
4.1k
If statement based on text of label
Dec 16 2019 3:19 PM
I am trying to do stuff based on the Text of a label.
Normaly it is working in C# i think ? ? but not in Visual Studio 2019 Xamarin Forms
I tried placing () in diverent ways but no luck
The Labelname is Hoi , and want to do stuff when i push the button and the Text of the label is "BDN"(for example)
But Hoi.Text = "BDN" is not working
The error is Cannot implicitly convert 'string' to 'bool'
Syntax error , '(' expected
async void OnZienButtonClicked(object sender, EventArgs args)
{
if Hoi.Text = "BDN"
{
///// do stuff
}
else
{
}
I also asked the question here
https://forums.xamarin.com/discussion/175679/print-document-with-if-stament-based-on-picker-value#latest
Reply
Answers (
2
)
Make Public void for all Editor
Check if number is higher then