Click here to Skip to main content
15,897,187 members

Comments by Member 10327451 (Top 7 by date)

Member 10327451 21-Nov-13 9:34am View    
I know 'Dictionary' doesn't mean 'Dictionary' but I wanting to try and use it that way with a CSV file as the pre-dermined dictionary but I get it now. Thank you.
Member 10327451 21-Nov-13 9:02am View    
But what about the Console code, won't it try to run in a console instead of the webservice? Sorry for bugging you, I'm just trying to understand it better. I want to be able to use the webservice as a dictionary, so i input one word and the meaning of that word is the output? Will that code do that on a webservice?
Member 10327451 21-Nov-13 8:45am View    
Hi, Thanks for the answer below. I'm just going to run it and have a look. Will this also work with a WebService though?
Member 10327451 21-Nov-13 6:36am View    
So far I have this;

[WebMethod]
string line;
StreamReader reader = new StreamReader("myfile.txt"); //writes to file
[WebMethod]
public class
{
private Dictionary<string,> _regionTimeValues = new Dictionary<string,>();
private String _words;


}

but from here I'm stuck. I've been using tutorials I found online but they're not helping.
Member 10327451 12-Oct-13 6:16am View    
Hi,

This is my code and I'm getting the error 'The name 'folderBrowserDialog1' does not exist in the current context' but I can't see why not and it's not pulling pictures from my picture folder.


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Windows.Forms.FolderBrowserDialog;

namespace Pictures
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void btnOpen_Click(object sender, EventArgs e)
{
if (folderBrowserDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{

getPics(folderBrowserDialog1.SelectedPath);// getl list of files
}
}
public void getPics(string fPath)
{

foreach (string file in Directory.GetFiles(fPath))
{
if (checkIfimage(file))//check if file is image
{
listBox1.Items.Add(file);
}
}
}


public bool checkIfimage(string fname)
{
bool isImage = false;
string extension = Path.GetExtension(fname).ToLower();

if (extension == ".jpg" | extension == ".png" | extension == ".bmp")
{
isImage = true;
}
return isImage;
}
}
}

Can you help? Thanks