|
What is the type of objCommand?
What is your vpost.txtNoPersonali.Text?
|
|
|
|
|
txtNoPersoneli forexample=45
|
|
|
|
|
What is objCommand? It's possible that your objCommand.Parameters["@nopersoneli"].Value gets string and you get it an integer variable.
and what is this "@" for?
|
|
|
|
|
Most likely you have some type of invalid character in vpost.txtNoPersoneli.Text...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi.
Please write your snippet code here.
|
|
|
|
|
try
objCommand.Parameters.add["@nopersoneli"].Value = convert.toint32(txtNoPersoneli.Text);
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
using System;
using System.Collections.Generic;
using System.Text;
public class Minimax
{
static void Main(string[] args)
{
// generate a simple game tree, starting with the root
Tree tree = new Tree(0);
// children of the root
tree.children = new Forest(new int[] { 0, 0 });
// children of the left child of the root
tree.children.first.children = new Forest(new int[] { 0, 7, 9 });
// children of the right child of the root
tree.children.rest.first.children = new Forest(new int[] { 4, 8, 6 });
// children of the leftmost child of the left child of the root
tree.children.first.children.first.children = new Forest(new int[] { 5, 3, 1 });
// write the expected and calculated minimax values to the console
Console.WriteLine("Expected minimax value is 5");
Console.WriteLine("Calculated minimax value of the tree " + tree.Minimax(true));
//Console.Write(tree.children.first);
Console.WriteLine("Press any key to exit ...");
Console.ReadKey();
|
|
|
|
|
And what is your question after all?
|
|
|
|
|
My question after all is about how to add a code with the variable that holds minimax value of the node, the node having a variable that holds the board position bearing in mind that the value of this valuable can be an array of length 9 which makes values X and O (or 1 and -1 talking of integers) leading to generating a tree automatically by computing successor states for the board positions represented by a particular code, starting with the empty board for the root node, recursively computing successors until terminal nodes reached.
|
|
|
|
|
|
Hi,
First of all, Please let me know if I am posting in the wrong forum.
I am tryingto access a class written in c# which has an array of classes. The class code is:
public class ClientData
{
private ClientDataDetail benchmark;
private ClientData[] buckets;
private ClientDataDetail portfolio;
public ClientDataDetail BenchMark
{
get{ return benchmark;}
set{ benchmark = value;}
}
public ClientData[] Buckets
{
get{ return buckets;}
set{ buckets = value;}
}
public ClientDataDetail Portfolio
{
get{ return portfolio;}
set{ portfolio = value;}
}
}
When I try to access this class in VBA as follows:
Dim clntData As ClientData
Set clntData = dispData.GetClientData()
//This is the line where I get the error: "Wrong Number of arguments or Invalid property assignment"
Dim anotherClntData As ClientData
<b> anotherClntData = clntData.Buckets(0)</b>
The same code (i.e. accessing the internal array of ClientData class via the indexer) works perfectly fine in c#.
Any pointers. Do I need to use an arraylist in place of array of classes?
|
|
|
|
|
newbieNeeraj wrote: anotherClntData = clntData.Buckets(0)
Your C# Buckets function gets or sets the whole buckets array (gets or sets ClientData[]) but you want to get one element from Buckets (ClientData)
|
|
|
|
|
Hi Pedram, Thanks for replying.
I do undertsand your reply.But then Please let me understand how come the same code functions correctly in c#? (If I understand what makes it work in C# maybe I could implement the same thing in VBA) Code sample below:
DisplayData cd = new DisplayData();
ClientData clntdata = new ClientData();
clntdata = cd.GetClientData();
ClientData data1 = new ClientData();
data1 = clntdata.Buckets[0];
Thanks,
Neeraj
|
|
|
|
|
I think this works:
DisplayData cd = new DisplayData();
ClientData clntdata = new ClientData();
clntdata = cd.GetClientData();
ClientData data1 = new ClientData();
cd.Buckets = new ClientData[100];
data1 = clntdata.Buckets[0];
modified on Saturday, September 27, 2008 3:50 AM
|
|
|
|
|
Hi Pedram,
Sorry for the late reply. Had left office the other day and I didn't have net access at home.
You are right. I am setting clientData.Buckets to some meaningful value. That was inside the function GetClientData().
What I am asking is that even after doing this,
ClientData data1 = new ClientData();
cd.Buckets = new ClientData[100];
// clndata.Buckets[0] = //Something usefull
data1 = clntdata.Buckets[0];
The last line gives me error. But the other two classes i. e. Protfolio and BEnchmark are accessible in VBA.
If I have an array of classes (private ClientData[] buckets;) in the class (ClientData) itself, can we not access it like c#? If not how can we modify the code to access it?
Thanks again for your time.
|
|
|
|
|
Hello newbieNeeraj
newbieNeeraj wrote: Sorry for the late reply.
I saw your post right now so I'm sorry too.
newbieNeeraj wrote: What I am asking is that even after doing this,
ClientData data1 = new ClientData();
cd.Buckets = new ClientData[100];
// clndata.Buckets[0] = //Something usefull
data1 = clntdata.Buckets[0];
The last line gives me error.
Did you uncomment line 3?
If not, it's like this:
int a;
int b = a;
Did you understand? You have to set a value for your variable before you can get it.
If yes and you uncomment line 3, I really don't know what is happening to your application, and unfortunately I have no more idea
What's your error message?
While (true) { Human.isLearnable = true; }
|
|
|
|
|
I want to set two find options : "MachCase" and "WholeWord"
this code works correctly :
richTextBox1.Find(StrSearch, RichTextBoxFinds.MatchCase);
but this code doesn`t work; It has compiler Error :
richTextBox1.Find(StrSearch, RichTextBoxFinds.MatchCase, RichTextBoxFinds.WholeWord);
How should I write this code to set either RichTextBoxFinds.MatchCase, RichTextBoxFinds.WholeWord
Hello Friends
|
|
|
|
|
Laji59 wrote: richTextBox1.Find(StrSearch, RichTextBoxFinds.MatchCase, RichTextBoxFinds.WholeWord);
If you noticed, RichTextBox.Find method has two arguments: string str, RichTextBoxFinds option.
So you have error.
You should ask your user which option he/she wants. MatchCase OR WholeWord
|
|
|
|
|
I know. But May be an User have either "MachCase" and "WholeWord" even more like "search Foreward or Backward".
This ability is also in Standard application like Microsoft Word or Visual Studio
Hello Friends
|
|
|
|
|
Well simply search your text with MatchCase if Find can't find anything (returns -1) search for WholeWord.
|
|
|
|
|
can any one tell me the references regarding Slide-In Menu Bar
which can be created or implemented in windows application using c#??
thanks in advance............
|
|
|
|
|
|
No,
i want slidding window for my application which can be running while do another work on my pc,
i.e. like windows background services
when i want to look my current usage or that application when i move cursor on it,
slide bar from left/right/top/bottom
thanks for reply
|
|
|
|
|
If I could understand you, you should try creating a child form for a MDIParent and with child form's MouseMove event you can done it.
|
|
|
|
|