Search Results

Showing results 1 to 40 of 55
Search took 0.03 seconds.
Search: Posts Made By: Rashakil Fol ; Forum: C# and child forums
Forum: C# Oct 19th, 2009
Replies: 7
Views: 275
Posted By Rashakil Fol
There's no such thing as a 'blank space.' An array with 64 elements will contain 64 elements. Some of them will be null, because that's what they were initialized with -- but that's no different...
Forum: C# Oct 19th, 2009
Replies: 7
Views: 275
Posted By Rashakil Fol
The "second" file from the list? Are you saying you're expecting Sort to look at the elements of the list in some particular order?
Forum: C# Oct 19th, 2009
Replies: 7
Views: 275
Posted By Rashakil Fol
If File y is null, what do you expect to happen? What is y.fsPos supposed to do when y is null? (Hint: it throws an exception.)

Apologies for the snark.

You should modify your Compare method...
Forum: C# Oct 13th, 2009
Replies: 9
Views: 338
Posted By Rashakil Fol
First of all, again, you should be iterating i from 0 to 2, not from 1 to 3.

Second, how do you know (at the time this code runs) that gemData has been written to? If you were getting an index...
Forum: C# Oct 11th, 2009
Replies: 6
Views: 295
Posted By Rashakil Fol
For this specific mechanism, you could make a function that converts your ArrayList to a byte[] and then passes that through an MD5 or SHA1 algorithm or whatnot. See...
Forum: C# Sep 24th, 2009
Replies: 11
Views: 509
Posted By Rashakil Fol
It uses the function System.Linq.Enumerable.Where, which takes an IEnumerable<T> and a function of type Func<T, Bool> and returns an IEnumerable<T> that contains all the values for which the function...
Forum: C# Sep 23rd, 2009
Replies: 11
Views: 509
Posted By Rashakil Fol
Whoops, I meant path.Split(new[] { '\\' }, StringSplitOptions.RemoveEmptyEntries).

And if you wanted to filter the empty entries manually, you'd probably do

path.Split('\\').Where(s => s.Length...
Forum: C# Sep 23rd, 2009
Replies: 11
Views: 509
Posted By Rashakil Fol
Just use path.Split('\\', StringSplitOptions.RemoveEmptyEntries).
Forum: C# Sep 21st, 2009
Replies: 10
Views: 556
Posted By Rashakil Fol
You need using System.Linq; at the top of your file.
Forum: C# Sep 20th, 2009
Replies: 12
Views: 580
Posted By Rashakil Fol
Except when doing joins, I prefer to avoid the LINQ syntax and just use the Enumerable extension methods directly. It makes the behavior more clear, sometimes.

If you want things grouped by X and...
Forum: C# Sep 20th, 2009
Replies: 10
Views: 556
Posted By Rashakil Fol
It should work for List<Microsoft.Xna.Framework.Rectangle>, which implements IEquatable<Microsoft.Xna.Framework.Rectangle>. Maybe you're expecting the code to modify the original list object. It...
Forum: C# Sep 19th, 2009
Replies: 12
Views: 580
Posted By Rashakil Fol
You can and should use v.Last() instead of v.ElementAt(v.Count()-1). Using v.Last() also only iterates through the collection once, which is sometimes something to be aware of (and sometimes a...
Forum: C# Sep 18th, 2009
Replies: 3
Views: 394
Posted By Rashakil Fol
Blah blah blah, why don't you answer the question instead of linking to some reference site.

linkpraveen: if you use a List<Invoice>, for example, it's impossible to have anything in that list...
Forum: C# Sep 9th, 2009
Replies: 3
Views: 274
Posted By Rashakil Fol
Instead of keeping variables first_address, second_address, and third_address, and so on, make an array of addresses and walk through the array until one succeeds or until they all have failed.
Forum: C# Mar 17th, 2009
Replies: 2
Views: 1,485
Posted By Rashakil Fol
ISingleResult<T> : IEnumerable<T>, so just use System.Linq.Enumerable.ToList.
Forum: C# Mar 16th, 2009
Replies: 2
Solved: byte vs char
Views: 1,265
Posted By Rashakil Fol
byte is an unsigned 8-bit integer whose values range from 0 to 255.

char is a 16-bit unicode character type. If you want to represent raw streams of bytes, you'll use bytes. You could also parse...
Forum: C# Mar 16th, 2009
Replies: 7
Views: 528
Posted By Rashakil Fol
What do you mean, the "SQL end"? Or "the application end"? I don't understand those terms.
Forum: C# Mar 16th, 2009
Replies: 3
Views: 412
Posted By Rashakil Fol
For starters, replace [1-9]+ with [1-9][0-9]*

When you use a preceding @ sign in C#, that means escape characters won't work. You can then write backslashes freely.

For example, @"C:\Documents...
Forum: C# Mar 16th, 2009
Replies: 7
Views: 528
Posted By Rashakil Fol
Yes, they use databases.

When we install software on a client we have some huge SQL files that create all the tables, indexes, and restrictions that we need.
Forum: C# Mar 15th, 2009
Replies: 3
Views: 412
Posted By Rashakil Fol
What's stopping you from making one?
Forum: C# Mar 15th, 2009
Replies: 5
Solved: User Interface
Views: 509
Posted By Rashakil Fol
Huh? I did not say that at all.
Forum: C# Mar 15th, 2009
Replies: 5
Solved: User Interface
Views: 509
Posted By Rashakil Fol
Well, define "very nice." The niceness of a UI depends on the developer. How is VS 2008 stopping you from making a nice UI?
Forum: C# Mar 13th, 2009
Replies: 26
Views: 2,308
Posted By Rashakil Fol
That code

is awful.

I would so make fun of you for that.

Show the code that defines the variables txt00 through txt88, so that we can put them in an array.
Forum: C# Mar 13th, 2009
Replies: 26
Views: 2,308
Posted By Rashakil Fol
They so do exist.

"Then why does it taste so salty?"
Forum: C# Mar 13th, 2009
Replies: 3
Views: 493
Posted By Rashakil Fol
See http://lmgtfy.com/?q=visual+studio+preprocessor+options&l=1
Forum: C# Mar 13th, 2009
Replies: 5
Views: 779
Posted By Rashakil Fol
Forum: C# Mar 12th, 2009
Replies: 9
Views: 581
Posted By Rashakil Fol
So there's your problem. If array2[i] gets stored 'X' when i is even and 'O' when i is odd, it will just contain { 'X', 'O', 'X', 'O', 'X', 'O', 'X', ... }

You should be using the turn number to...
Forum: C# Mar 11th, 2009
Replies: 5
Views: 305
Posted By Rashakil Fol
Put the common functionality in the same dll -- or better yet just use a version control system with subprojects.
Forum: C# Mar 11th, 2009
Replies: 9
Views: 581
Posted By Rashakil Fol
You're missing braces, for one. And you only have 4 win conditions -- tic tac toe has eight. Why are you using the variable i in the win condition? The win condition has nothing to do with the...
Forum: C# Mar 10th, 2009
Replies: 22
Views: 2,087
Posted By Rashakil Fol
95 years old
Forum: C# Mar 10th, 2009
Replies: 22
Views: 2,087
Posted By Rashakil Fol
For ****'s sake, pride is retarded.
Forum: C# Mar 3rd, 2009
Replies: 19
Solved: Validation
Views: 942
Posted By Rashakil Fol
Why do you do this? This is not C. Predeclaration makes code less readable.
Forum: C# Mar 1st, 2009
Replies: 5
Views: 300
Posted By Rashakil Fol
In your code sample, g1 and g2 are local variables in the Main function. They cannot be seen anywhere outside the main function. Since you're trying to use a variable named g1 in GoodMorning,...
Forum: C# Mar 1st, 2009
Replies: 5
Views: 300
Posted By Rashakil Fol
Your function Goodmorning is referring to some variable g1, and there is no variable named g1 in its scope. Learn how scope works in C# and you'll understand your problem.

Edit: And I'm assuming...
Forum: C# Feb 26th, 2009
Replies: 5
Views: 1,787
Posted By Rashakil Fol
Where is the error generated from?
Forum: C# Feb 23rd, 2009
Replies: 6
Views: 459
Posted By Rashakil Fol
What do you mean 'retrieve' the data? You have the data. If you want to use the data, put it in an array and iterate over it.
Forum: C# Feb 19th, 2009
Replies: 3
Solved: framework2.0
Views: 442
Posted By Rashakil Fol
Your question makes no sense -- ArrayList is already in .NET 1.1.
Forum: C# Feb 17th, 2009
Replies: 5
Views: 701
Posted By Rashakil Fol
Well, Partition can clearly return an array. And you can obviously alter the array that it returns. And you can easily construct an an array. I don't understand your question.
Forum: C# Feb 16th, 2009
Replies: 5
Views: 701
Posted By Rashakil Fol
I suggest you call Partition on the tail _before_ you examine the first element of the list. Then update the array that Partition returns appropriately to account for the first element of the list. ...
Forum: C# Feb 4th, 2009
Replies: 2
Views: 317
Posted By Rashakil Fol
A struct defines a value type; a class defines a reference type.

A value type is one whose values cannot be separated from the variable. If you try copying it to a different variable, you'll make...
Showing results 1 to 40 of 55

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC