473,667 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why am I getting squiggly blue?

On .Friday and .Saturady and .Sunday in thie followign if statement
(The code is form deitel book; I am writing the same code on my own)

if ( dropOffDate.Day OfWeek == DayOfWeek.Frida y ||
dropOffDate.Day OfWeek == DayOfWeek.Satur day || dropOffDate.Day OfWeek ==
DayOfWeek.Sunda y)

Nov 2 '06 #1
3 1339
Ensure you have:

using System;

At the top. The DayOfWeek enum is in the System namespace. You could
also just add the word System. infront of DayOfWeek.

Kelly S. Elias
Webmaster
DevDistrict - C# Code Library
http://devdistrict.com

Amanda wrote:
On .Friday and .Saturady and .Sunday in thie followign if statement
(The code is form deitel book; I am writing the same code on my own)

if ( dropOffDate.Day OfWeek == DayOfWeek.Frida y ||
dropOffDate.Day OfWeek == DayOfWeek.Satur day || dropOffDate.Day OfWeek ==
DayOfWeek.Sunda y)
Nov 2 '06 #2
If dropOffDate is defined as DateTime it compiles correctly on my system, no
squigly anything.

Regards,
John

"Amanda" <am**********@y ahoo.comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
On .Friday and .Saturady and .Sunday in thie followign if statement
(The code is form deitel book; I am writing the same code on my own)

if ( dropOffDate.Day OfWeek == DayOfWeek.Frida y ||
dropOffDate.Day OfWeek == DayOfWeek.Satur day || dropOffDate.Day OfWeek ==
DayOfWeek.Sunda y)

Nov 2 '06 #3

John J. Hughes II wrote:
If dropOffDate is defined as DateTime it compiles correctly on my system, no
squigly anything.

Regards,
John

"Amanda" <am**********@y ahoo.comwrote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
On .Friday and .Saturady and .Sunday in thie followign if statement
(The code is form deitel book; I am writing the same code on my own)

if ( dropOffDate.Day OfWeek == DayOfWeek.Frida y ||
dropOffDate.Day OfWeek == DayOfWeek.Satur day || dropOffDate.Day OfWeek ==
DayOfWeek.Sunda y)
Yes it's declared DateTime.

Nov 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2494
by: Wm | last post by:
I'm totally clueless on this one -- I'm getting 3 copies of every Email (in plain text, not HTML as expected), from a single mail() line... Can anyone tell me what might be causing the duplicates?? Thanx! Wm <?PHP include('dbconn.php');
2
6907
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on a type mismatch. It is positively because of the boolean(java primitive)parameter. It goes fine if I change this parameter to int or String. This inteface has a lot more methods which works fine, it is just the
3
3578
by: J | last post by:
Can anyone tell me how to turn off the feature that creates the blue squiggly line under code that has errors? Is that feature called background compile? I am working on a huge project, and it seems that the more errors that are found by this feature, the slower Visual Studio runs.
5
1893
by: Francis Bell | last post by:
I just found that my fin stream is not getting passed to my readInASpinnerbait function. Here's what I have: string readInFirstChars(ifstream &fin) { char first; string print; while (fin.good()) { fin.get(first, 4, '/');
1
3419
by: VB Programmer | last post by:
I can use response.write in any one of my webforms. But when I try to use it in a Module's public sub there is a squiggly blue line under response. Hovering over it says 'Name response is not declared.' Do I have to import something? Any ideas? Thanks in advance.
5
1427
by: Brian Henry | last post by:
I have a page which reads an article from the database it has 1 text box, 2 dropdown lists, and a longreat HTML text box. I load the information from the database when the page is set to edit mode from a query string action=edit, now when i click on the update button it does the update event, the problem is, it still has the old unedited data in memory... and places the old stuff back into the database (saw this when debugging) the SQL is...
8
10003
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported the following error when attempting to create or open the Web project located at the following URL: 'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
13
10125
by: dbuchanan | last post by:
Hello, Here is the error message; ---------------------------- Exception Message: ForeignKeyConstraint Lkp_tbl040Cmpt_lkp302SensorType requires the child key values (5) to exist in the parent table. ----------------------------
4
2577
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, <asp:DropDownList id="DropDownList1" runat="server" onchange="Test();"> can someone please tell me why the onchange has a squiggly and if there is a better way to access the client-side change event for the drop-down list? The message is saying it's not a valid attribute of the drop down list element but yet it still works for me?
1
2000
by: Cirene | last post by:
I'm binding a datagrid to my business object. I get an error that the type 'abcshoppingcart'...is not marked as serializable. So, I added a attribute in the class. But then a blue squiggly appears with 'declaration expected'. Any idea why? Public Class abcshoppingcart Public customer As New abccustomer Public product As New List(Of abcproduct)
0
8458
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8366
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.