16,018,347 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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
Member 10327451
11-Oct-13 12:01pm
View
Deleted
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
Member 10327451
10-Oct-13 5:37am
View
Hi sorry, I forgot to add that trying to do it on a Windows Form first, before migrating to a wep application.
Show More