http://msdn2.microsoft.com/en-us/lib...ta(VS.80).aspx
says:
"Avoid key conflicts by adopting a naming convention to generate
unique keys for key/value pairs. ... two applications, named Products
and Suppliers, each has a method named Sales. The Sales method in the
Products application provides the SKU of a product. The Sales method
in the Suppliers application provides the SID of a supplier. The
naming convention yields the keys, "Products.Sales .SKU" and
"Suppliers.Sale s.SID"."
But, how do we get the strings "Products.Sales .SKU" and
"Suppliers.Sale s.SID" without hard coding them?
Zytan 1 1918
Zytan,
All they are saying is that you should use unique key values from different
methods / classes when populating the Data property of an Exception object.
It's perfectly OK to hard code the values for the keys, as long as they are
different in each class / method.
They were only making a logical suggestion. You can call your key
"Hamburger" if you like, as long as you don't try to add another "Hamburger"
key to your Exception's Data property somewhere else up the call stack.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Zytan" wrote: http://msdn2.microsoft.com/en-us/lib...ta(VS.80).aspx
says:
"Avoid key conflicts by adopting a naming convention to generate
unique keys for key/value pairs. ... two applications, named Products
and Suppliers, each has a method named Sales. The Sales method in the
Products application provides the SKU of a product. The Sales method
in the Suppliers application provides the SID of a supplier. The
naming convention yields the keys, "Products.Sales .SKU" and
"Suppliers.Sale s.SID"."
But, how do we get the strings "Products.Sales .SKU" and
"Suppliers.Sale s.SID" without hard coding them?
Zytan
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Victor Bazarov |
last post by:
In the project I'm maintaining I've seen two distinct techniques used for
returning an object from a function. One is
AType function(AType const& arg)
{
AType retval(arg); // or default construction and then..
// some other processing and/or changing 'retval'
return retval;
}
|
by: laredotornado |
last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to
have my Javascript function execute from the BODY's "onload" method,
but if there is already an onload method defined, I would like mine to
run immediately after it. So in the code below, what JS would i need
to add to my "myfile.inc" page so that I could guarantee this behavior?
<!-- main page -->
<html>
<head>
<script type="text/javascript">
|
by: Pierre Barbier de Reuille |
last post by:
Please, note that I am entirely open for every points on this proposal
(which I do not dare yet to call PEP).
Abstract
========
This proposal suggests to add symbols into Python.
Symbols are objects whose representation within the code is more
important than their actual value. Two symbols needs only to be
|
by: Nathan Sokalski |
last post by:
I add a JavaScript event handler to some of my Webcontrols using the
Attributes.Add() method as follows:
Dim jscode as String = "return (event.keyCode>=65&&event.keyCode<=90);"
TextBox2.Attributes.Add("onKeyPress", jscode)
You will notice that jscode contains the JavaScript Logical And operator
(&&). However, ASP.NET renders this as && in the code that is
|
by: mitchman10 |
last post by:
My Time table has TimeID,Employee,PayPeriod,ChargeCodeID,Hours
My Chargecode table has ChargecodeID,c_Text
I need an Editable datagrid that will show the
TimeID,Employee,PayPeriod,C_Text in a label and hours, along with an
edit linkbutton.
When they click on edit, the edit button turns to Update Cancel
TimeID stays read Only
| |
by: weiwei |
last post by:
Hi
here is my scenario, I create a drop down list in itemtemplate.(that
drop down is created from db), after user
click edit command, my ideal plan is have another drop down list in
edititemtemplate with preselected value from
the previous drop down list, so far I can only achieved with the
regular drop down list in edititemtemplate with no preselected value
from previous one. anyone can help me.
thanks in advance. below is my current...
|
by: Zytan |
last post by:
http://msdn2.microsoft.com/en-us/library/system.exception.data(VS.80).aspx
says:
"Avoid key conflicts by adopting a naming convention to generate
unique keys for key/value pairs. ... two applications, named Products
and Suppliers, each has a method named Sales. The Sales method in the
Products application provides the SKU of a product. The Sales method
in the Suppliers application provides the SID of a supplier. The
naming convention...
|
by: =?Utf-8?B?QW5keSBZdQ==?= |
last post by:
Hi,
I'm trying to return exceptions from a WCF Service using FaultExceptions. I
got the service compiled and running. But I get an error while adding a
service reference to it. The error reads:
"
Attempting to download metadata from
'http://localhost:4619/WCFService1/Service.svc' using WS-Metadata Exchange or
DISCO.
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension:
|
by: eliben |
last post by:
Python provides a quite good and feature-complete exception handling
mechanism for its programmers. This is good. But exceptions, like any
complex construct, are difficult to use correctly, especially as
programs get large.
Most of the issues of exceptions are not specific to Python, but I
sometimes feel that Python makes them more acute because of the free-n-
easy manner in which it employs exceptions for its own uses and allows
users...
|
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...
|
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,...
| |
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...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |