|
Hello
In C# i need to display a value of a structure.
In PowerShell this method work :
<pre lang="text">$func2.Imports['CUSTOMERADDRESS'].get_paramvalue()["city"]</pre>
But, in C#, i don't found how call the value "CITY" of the structure "CUSTOMERADDRESS" with the BAPI "BAPI_CUSTOMER_GETDETAIL2"
Can you help me please ?
I have try more more different code but do not work... do not found
Sorry for my english.
I use ERP CONNECT THEOBALD
Thank you.
In powershell this is ok :
$func2.Imports['CUSTOMERADDRESS'].paramvalue["city"]
In C# : string strTest = Convert.ToString(func.Imports["CUSTOMERADDRESS"].ParamValue["city"])
;
Error : Can not apply indexing with [] to an expression of type 'Object'
|
|
|
|
|
Wrong forum. You should either post this in Q & A or in C# forum.
"You'd have to be a floating database guru clad in a white toga and ghandi level of sereneness to fix this goddamn clusterfuck.", BruceN[ ^]
|
|
|
|
|
Ask here: Quick Answers[^]
Peter Wasser
"The whole problem with the world is that fools and fanatics are always so certain of themselves, and wiser people so full of doubts." - Bertrand Russell
|
|
|
|
|
|
|
wow!
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Brisingr Aerowing wrote: This guy is LUCKY! Or really very unlucky to be the only person out of 7 billion people to be there at that exact spot at that exact time!
Well, I guess he could've been at worse places.
|
|
|
|
|
Sander Rossel wrote: Or really very unlucky to be the only person out of 7 billion people to be there at that exact spot at that exact time! I admire your pessimism.
You have just been Sharapova'd.
|
|
|
|
|
It's hard work, but as a pessimist you rarely get disappointed
|
|
|
|
|
You think that was a close call, wait until you see this.
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
Watch One Year of the Earth From a Million Miles Away[^]
Awesome!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Dude!
|
|
|
|
|
What a beautiful planet we live on!
Amazing work by NASA.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Can you use style tags in an article?
Didn't know where to ask so I got fire britches on.
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
|
Ahhh thanks for heads up.
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
|
I just used a bottle brush to clean my laptop's power jack, and it started charging the instant I plugged it in. I'm going to let it charge for a while and then turn it on and see what happens. I still think the power brick is bad, though.
A whole pile of dark-colored junk came out of the jack when I cleaned it, so it was very dirty.
EDIT: Power brick is still bad. It stopped charging when I turned it on, and turning it off caused it to start charging again. Still, this will work for now.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
modified 21-Jul-16 15:54pm.
|
|
|
|
|
Just had the same thing with my phone. Would not charge. Went to see a genius and they stuck a tiny screwdriver in and pulled out a piece of lint the size of Texas. Job done
|
|
|
|
|
R. Giskard Reventlov wrote: size of Texas Must be pretty small then...
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
We get a shiny new "?" operator that takes
string result = null;
if (field != null)
{
result = field.Value;
}
and converts this to
string result = field?.Value
So what about the case where we're handling a flaky API
string result = null;
try
{
result = DodgyApi.GetValue();
}
catch
{
result = null;
}
What would you suggest we do for that? What about a headasplode (*) operator
string result = DodgyApi.GetValue*();
where GetValue* will silently swallow the exception thrown by GetValue and return default .
Or am I setting a new standard for lazy, shameful programming here this hot, lazy afternoon?
cheers
Chris Maunder
|
|
|
|
|
Seems like an awful idea to me - I want code that silently swallows exceptions to be a pain to write.
However, you could always add the suggestion to the Roslyn GitHub repo[^] for discussion. It doesn't seem half as mad as some of the other suggestions on there!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
In this case, though, it's not really silently swallowing the exception. If the headasplode operator guarantees returning null on exceptions, then in using the operator your're explicitly expressing what you'd like to do if an exception occurs.
It's more like exception handling shorthand than exception ignoring.
|
|
|
|
|
But with that operator, you've got to look closely at every method call to see whether or not it ignores exceptions. With the try..catch block, it's obvious what's happening.
Also, how often do you really need to ignore every possible exception? Isn't it more likely that you'd want to ignore specific exception classes, and let unexpected exceptions propagate?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I agree that making things as obvious as possible is a good approach.
How do you feel about the way Java handles this, where exceptions are part of the method signature, i.e. int addSomeNumbers throws Abc { } . And if you call a method that throws an exception, you have to either handle or rethrow (and add the throws clause to your method) if you want your code to compile.
A lot of people seem to hate Java's checked exceptions, but if you're working on a big enough corporate code base, in which case there are probably at least a few lazy or marginally competent developers on the team, I can see the value in checked exceptions.
|
|
|
|