Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6167819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:34:42+00:00 2026-05-23T22:34:42+00:00

Hey looking through the net I can’t seem to find a solution on how

  • 0

Hey looking through the net I can’t seem to find a solution on how to pull these values out of this column of mine, I have only been developing for a year at Uni so this is all new to me.

Basically I don’t know how to do it, and reading up on Linq to SQL as well as conditional statements and loops hasn’t brought me any closer to finding my solution.

It’s as simple as this statement below:

public void SendToast(string title, string message)
{
    var toastMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
        "<wp:Notification xmlns:wp=\"WPNotification\">" +
        "<wp:Toast>" +
            "<wp:Text1>{0}</wp:Text1>" +
            "<wp:Text2>{1}</wp:Text2>" +
        "</wp:Toast>" +
        "</wp:Notification>";
    var messageBytes = System.Text.Encoding.UTF8.GetBytes(toastMessage);
    using (clientsDBDataContext clientDB = new clientsDBDataContext())
    {
        var client = new ServiceFairy.clientURI();
        foreach (string r in client.uri)
        {
            Uri rs = new Uri(r.ToString());
            SendMessage(rs, messageBytes, NotificationType.Toast);
        }
    }
}

I know for a fact I am doing it wrong but I just cant get my hands on how to fix this, if it wouldn’t be too much to ask, please explain how I am doing this wrong as I feel useless when I have to ask others to help me out with stuff I can’t figure out myself.

Thanks 🙂

This is the error Message I am getting:

Error   1   Cannot convert type 'char' to 'string'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:34:43+00:00Added an answer on May 23, 2026 at 10:34 pm

    What is this line doing?

    var client = new ServiceFairy.clientURI();
    

    Aside from the fact that this wouldn’t compile (it needs to be new ServiceFairy()), what does clientURI() return? You use it here like this:

    foreach (string r in client.uri)
    

    I suspect that client.uri is actually a string. If not, what is it? Assuming it’s a string, then looping over any string in C# results in looping over the characters in the string. So I expect your compiler error is due to the fact that you are declaring r as a string, but it’s actually a char. Most likely you don’t need a loop at all, but I can’t answer that until you explain what client.uri actually returns.

    And if you’re feeling generous, perhaps you can explain why you have a class named ServiceFairy. 😉

    Edit:
    Based on the comments, the code should go from:

    var client = new ServiceFairy.clientURI();
    foreach (string r in client.uri)
    {
        Uri rs = new Uri(r.ToString());
        SendMessage(rs, messageBytes, NotificationType.Toast);
    }
    

    To:

    var client = new ServiceFairy.clientURI();
    Uri rs = new Uri(client.uri);
    SendMessage(rs, messageBytes, NotificationType.Toast);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey! I was looking at this code at http://www.gnu.org/software/m68hc11/examples/primes_8c-source.html I noticed that in some
Hey, I stumbled upon this site looking for solutions for event overlaps in mySQL
Hey, I was looking through W3's tutorial on AJAX and I decided to make
Hey everyone. I'm fairly new to VB.NET and I'm looking to create a module
Hey guys this question is a bit nebulous so I apologize...I'm just looking for
Hey i was looking through some of WP's code and I noticed in certain
Hey so following this Question I've gotten stuck again, and yeah I've tried looking
Hey Looking for a regular expression which I can use to check for valid
I'm trying to find out where I can get district / neighborhood info for
Hey all, my Computational Science course this semester is entirely in Java. I was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.