15,905,563 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 Python 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 13302374 (Top 34 by date)
Member 13302374
20-Jul-17 6:45am
View
In this practice exercise, 'text' is a string which is programmed to be of any length. I hope this makes sense
Member 13302374
20-Jul-17 4:52am
View
Hmm not working. I took out the split part and tried it again, as the given text is already separated by new line characters, but still it doesn't work
Member 13302374
20-Jul-17 4:41am
View
It gives me an unhandled exception, stating "Illegal characters in path", when I build and run the code
Member 13302374
18-Jul-17 6:33am
View
Thanks, this worked and I understand the code.
Member 13302374
18-Jul-17 6:15am
View
Hmm, still not working
Member 13302374
18-Jul-17 5:55am
View
"if the array does not contain enough elements, return "Array not valid length", any other exception should return "Corrupt Data"."
Hoe exactly would I code this into the catch (exception) part? The part above seems correct
Member 13302374
18-Jul-17 5:42am
View
I see. I'll delete that. Any ideas on how I can modify this?
Member 13302374
17-Jul-17 9:06am
View
Cheers Pete
Member 13302374
17-Jul-17 6:44am
View
Thanks, let me break this down to understand it even more.
Member 13302374
17-Jul-17 5:35am
View
I tried this and I get errors
Member 13302374
17-Jul-17 4:57am
View
Thank you. I need to get my head around when to use a for loop, and when to use other types. I guess this'll come with experience
Member 13302374
13-Jul-17 9:15am
View
Thank you once again. Your knowledge of C# is inspiring me and you also are explaining things, which helps me to develop understanding and not just syntax.
Member 13302374
13-Jul-17 8:41am
View
That my updated question, Andy. Thanks
Member 13302374
13-Jul-17 8:41am
View
https://www.codeproject.com/Questions/1196326/Csharp-calculate-number-of-days-away-from-a-deadli
Member 13302374
13-Jul-17 8:32am
View
They closed the post because it was not clear enough. Let me try and update it now, although it's the same as the one above
Member 13302374
13-Jul-17 7:46am
View
No I get a squiggly red line underneath everything. It says it 'cannot implicitly convert double to int. an explicit conversion exists (are you missing a cast?)'.
Member 13302374
13-Jul-17 7:33am
View
I've posted a new question :)
Member 13302374
13-Jul-17 7:16am
View
So, let's say for example, I had a question like: Given the date and time of an appointment return how many days it is in the future (in full days e.g. at 11pm tonight, an appointment at 9am tomorrow is 1 day).
My code would be:
public static int HowManyDaysFromToday(DateTime appointment)
{return appointment.TimeOfDay.Subtract(DateTime.Now.TimeOfDay).TotalDays;}
Is this correct?
Member 13302374
13-Jul-17 6:39am
View
Thank you Sir!
Member 13302374
11-Jul-17 12:11pm
View
This conversation is funny to me. I can take someone who is trying to learn seriously. But someone who has knowledge and acts like an ass, I can't respect. Sorry
Member 13302374
11-Jul-17 12:10pm
View
And how accomplished are you in other areas of life? I can tell you are not, because of how stuck up you are. I'm doing great on my learning curve. I'll get answers by any means, even if means to piss people off. I don't give a damn. That's part of why I get places in life.
How many languages do you speak? It's okay, I'll wait....
Member 13302374
11-Jul-17 12:02pm
View
I'll probably turn out to be a better coder than you. You must have forget everyone starts somewhere. Peace out
Member 13302374
11-Jul-17 12:01pm
View
Okay, and if you knew my search history on my browser, it would speak for itself. It seems like you have your head up your backside. You clearly have excelled at everything. The funny thing is, you never know who you are speaking to or how accomplished they are in life, over the internet. You are telling me to be academic lol. Anyway, let me leave you to it..
Member 13302374
11-Jul-17 11:51am
View
And if you don't want to explain basic things, then don't comment. Acting like you are God's gift to the earth, get over yourself!
Member 13302374
11-Jul-17 11:45am
View
Thank you for attempting to explain Richard.
Member 13302374
11-Jul-17 11:45am
View
Wow, the arrogance. You are good at coding, okay, I get it. And there are things I could teach you which you probably know nothing about. Be humble lol
Member 13302374
11-Jul-17 8:48am
View
your code didn't work, I guess because I'm on a specific training program and they only want the expected answers. I will try your code when I get on my own computer. As for my code, what is the small correction that I am missing out?
Member 13302374
11-Jul-17 7:29am
View
Thanks. I will try this. As far as my code
return datetime.ToString("dddd, MMMM dd, yyyy HH:mm:ss");
do you know what would be the correction that I am missing? I need it to say automatically whether it's AM or PM after the time. When I run this code, the error box tells me the time is coming out as 00:00:00, so there's definitely something wrong somewhere
Member 13302374
11-Jul-17 7:16am
View
return datetime.ToString("dddd, MMMM dd, yyyy HH\:mm\:ss");
Like this?
Also, I need to have AM or PM automatically written on the end. I saw it on the website that was provided above, but can't see the code for it
Member 13302374
11-Jul-17 6:59am
View
Thanks for the link. Please bear in mind I'm new and learning, so not everything will be obvious.
return datetime.ToString("dddd, MMMM dd, yyyy HH:mm:ss");
That's my updated code, which still brings an error. It must be the last part, but I've followed the documentation as best as possible
Member 13302374
11-Jul-17 6:52am
View
Thanks! It was correct. Their answer was
return (int) DateTime.Now.TimeOfDay.TotalMinutes.Round(0);
Do you know the significance of the Round(0)?
Member 13302374
10-Jul-17 10:38am
View
I see. Any ideas on how I'd code this?
Member 13302374
10-Jul-17 10:37am
View
Where did you get the bstring from? I get a red squiggly line underneath this
Member 13302374
10-Jul-17 10:35am
View
When I press Ctrl+F5 to build and run this, I get a box saying:
Test Case failed:
Invoked method with (abc,9)
expected (abcabcabc)
received (abcabc)
Show More