|
rkarthickbeece wrote: 0x03, is an invalid character
No it isn't; it's a Ctrl-C. I've had to deal with that at times -- generally you can just filter out characters like that before trying to process the data.
This space intentionally left blank.
|
|
|
|
|
Dear friends and Bosses...
I am Arif. I am very new to programming world. Trying to make my 15 years old dream come true. Becoming a developer.
1. I have a very little knowledge about C. Never developed any application.
2. Want to become a Web developer then App developer.
3. Want to learn C#.
I am very confused about OOP. And so about C#.
Is there any book or website or reference about anything that tell me the similarities about C and C#.
Like USING SYSTEM in C# is as same as #include <headerfile.h>...
and also any very easy to understand book for C#... that explains everything including the c# terminologies like INSTANCE, METHOD, BUSINESS CLASS....like that...please....thanks a lot.
|
|
|
|
|
They're exactly the same except for the parts that are different.
Member 10583150 wrote: Like USING SYSTEM in C# is as same as #include <headerfile.h>...
No. In C# using directives are optional, but in C you won't be able to do much without including header files somehow.
This space intentionally left blank.
modified 14-Feb-14 19:31pm.
|
|
|
|
|
thanks a lot for your reply. that INCLUDE was an example. but is there book or website or youtube vdo do you know where i can learn c# from. I do not have any OOP idea. at all. its it is very confusing. the terminologies are extremely hard for a beginner. and i donno why none explains it properly.
|
|
|
|
|
PIEBALDconsult wrote:
They're exactly the same except for the parts that are different. |
Which are most of them, especially the ones that look the same.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
+5 for the links!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
The free e-book, .NET Book Zero[^] by Charles Petzold, is a very useful starter.
Veni, vidi, abiit domum
|
|
|
|
|
To add to the other examples, stop trying to compare C and C#: they are completely different languages which happen to share a similar looking syntax If you assume that all you need to know are "the differences" that you are going to get a completely wrong idea about C# and it will not work well for you.
If you want to learn C#, forget all you know about C - it will only confuse the issue. And get a good book (or a training course if you can) and do it completely, starting from the beginning and doing each and every exercise.
You've had some suggestions, and this is another: Pro C# 5.0 and the .NET 4.5 Framework
http://www.amazon.co.uk/Pro-NET-Framework-Professional-Apress/dp/1430242337[^] - I learned C# from one of the earlier incarnations of this and it covers the material well.
Might be a little heavy duty for a complete beginner to computers though!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Hi All, im having the following problem with a project.
Im trying to use the following (for a search bar button) to pull data from the Product table I have in my SQL db. However when I hit the search button, I get an error with the conn.Open() line
protected void btnsearch_Click(object sender, EventArgs e)
{
SqlCommand search = new SqlCommand("spSearchProductByName", conn);
search.CommandType = CommandType.StoredProcedure;
conn.Open();
search.ExecuteNonQuery();
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = search;
DataSet ds = new DataSet();
da.Fill(ds, "ProductName");
gvSearchResults.DataSource = ds;
gvSearchResults.DataBind();
conn.Close();
Any help would be appreciated
|
|
|
|
|
Remember, we're not mind readers and can't see your screen. So we have no idea what "error" you're receiving. Have you tried initializing conn ? Also, wrap your code in a try/catch block so you can inspect the exception and thereby identify the problem.
/ravi
|
|
|
|
|
Since you get an error when trying to open the connection, the most likely things are that:
1) You haven't initialized the connection string into the SqlConnection object
2) Your connection string is wrong.
So use the debugger, look at the connection and at the error object and see what it says. Then check your connection string. Chances are it's not valid - it could be your username is wrong, or the PC instance. But we can't tell from here!
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
Other possible errors
- Database isn't up
- Database isn't accessible from current location.
|
|
|
|
|
I find for example: create lines running up the pannel, how can you share yourself with.
|
|
|
|
|
|
Hi everyone,
I'm currently working on a path finding project in C#. I do have experience with the C# language but the concept of AI such as path finding is pretty new to me. I have been following a couple of tutorials but I'm struggling to get my head around the subject. Can anyone recommend/point me to some tutorials or resources that would be suited towards beginner levels?
Thanks in advance!
|
|
|
|
|
|
|
Also see this[^] tutorial.
/ravi
|
|
|
|
|
I'd recommend attempting it first without any tutorials; a very blunt way of doing it would be by letting an imaginary hamster walk (test) each path. Take the hamster that's home first.
A sweet optimization would be to have the hamster compare his current distance from the start to all previous found path-lengths; if you've exceeded your "fastest" time, than that particular path can be dismissed without further analysis/walking. Another way to get a result faster is to have multiple hamsters walk the routes.
After that the tutorials will probably make a bit more sense.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks for the advice!
|
|
|
|
|
i want to accept only numeric value to a textbox in datagridview. i used following code insert textbox in gridview
DataGridViewTextBoxColumn txt = new DataGridViewTextBoxColumn();
dataGridView1.Columns.Add(txt);
txt.HeaderText = "MARKS";
can u help me?
|
|
|
|
|
|
While the code you will find here is used with a WinForms TextBox, not with a DataGridView, you might find some ideas you can use in the logic shown in the code for the 'KeyDown EventHandler [^]:
private void tbxIntegerEntry_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
string mTxt = tbxIntegerEntry.Text;
EnteredValue = null;
if (mTxt != String.Empty && mTxt != "-")
{
EnteredValue = Convert.ToInt64(mTxt);
this.Hide();
}
}
e.SuppressKeyPress =
!(
e.KeyCode == Keys.Back
||
tbxIntegerEntry.Text.Length <= maxInt64Length
&&
char.IsDigit(Convert.ToChar(e.KeyCode))
||
(tbxIntegerEntry.Text.Length == 0) && (e.KeyCode == Keys.OemMinus)
);
}
“But I don't want to go among mad people,” Alice remarked.
“Oh, you can't help that,” said the Cat: “we're all mad here. I'm mad. You're mad.”
“How do you know I'm mad?” said Alice.
“You must be," said the Cat, or you wouldn't have come here.” Lewis Carroll
|
|
|
|
|
Hi,
I have used below code to log in to my network drive, before using this code every time when i manually access the network folder it asks me credential to login. But after executing this code the network drive is not asking for any credential when i manually locate to the network drive. Any idea what is happening
[DllImport("advapi32.dll")]
public static extern int LogonUserA(String lpszUserName,
String lpszDomain,
String lpszPassword,
int dwLogonType,
int dwLogonProvider,
ref IntPtr phToken);
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern int DuplicateToken(IntPtr hToken,
int impersonationLevel,
ref IntPtr hNewToken);
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool RevertToSelf();
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
public static extern bool CloseHandle(IntPtr handle);
|
|
|
|