|
Hi,
I am trying to migrate my utility library (formerly a plain .NET4.5 library) to a PCL library which supports both .NET 4.5 and the Windows Universal app (for Windows 10) app.
I got some issue working out why some things are working and some are not.
For example Task is fine. I can do Task.Run() on both .NET4.5 app (obviously!) and Universal app.
But Thread is not. new Thread() will fail to compile for Universal app.
Trying to use the documentation is of no help. In either project it send me to the same location! From which I am lead to believe that (System.Threading.)Thread class does exists! Though it doesn't! (in Universal app, that is)
Is there any tip / trick / reference (other than the compiler complaining) that will let me know in advance which .NET4.5 class will be supported in a Universal library and which is not?
|
|
|
|
|
Look at the .NET API you want to use and look for this image[^]. That tells you if the API can be used in a PCL project.
No Thread constructors are marked with that image, so you cannot create new threads.
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???
|
|
|
|
|
Oh... this Icon is not present on either Task or Thread in the offline documentation!
Mm... so there is a few extra on the online documentation hey?!
Thanks!
|
|
|
|
|
I remember seeing a red shopping bag like icon on local versions of the documentation. I think that means the same thing.
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???
|
|
|
|
|
Well the offline documentation in VS2015 doesn't seem to have anything!
Well I can see whether it works on Silverlight, Windows Phone (silverlight), etc.. But Windows Runtime support doesn't seems to have any distinct UI with it!...
|
|
|
|
|
I see the icons on my local docs. VS2015 Community. Are you sure you have the local docs installed?
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???
|
|
|
|
|
hi my name is bigboy. im teaching myself c# and my goal at this point is to make a trading card game, in a console application due to no art skills, does anyone have any reads that would help me accomplish my goal, or a search option to find what im looking for.
|
|
|
|
|
Search for "card game"? There are some projects in codeproject such as
[^]
|
|
|
|
|
Please, don't try to teach yourself C# by writing code: get a book, or a course, and work your way through it.
Writing code can get you to a point where you feel comfortable writing code - but you can miss out on huge chunks of language and framework which would make it a lot easier and more efficient. A structured book or course introduces each part in a logical sequence, so nothing gets missed out.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I'm replying to your direct comment because it's relevant to more that just you!
OK, so you have a budget to $0 - that doesn't mean you can't learn properly!
Yes, you could learn to fly a plane by watching a pilot do it and (provided you started off high enough) you probably be able to get it into roughly straight and level flight (and possibly even in the right direction). But...you'd be in real trouble when you approach an airport!
Development is the same: you can pick up some coding ability by "try it and see" but that doesn't mean that you know why you do things like that - go to QA and you will see hundreds of questions a week on the same subject "How do I fix 'Null reference exception'?" - all because they haven;t understood what a variable is, what an instance is, and they probably either ignored that bit or just glossed over it because it was boring. But if you know the basics, it's obvious what the problem is!
Learning by coding won't teach you much that is useful for developing your own applications: at best it teaches you how to create that application, and it's not obvious how that relates to the next one.
So...if you are doing this to get a job in the industry, find the budget for a book. Better, find the budget for a course. Or visit you local public library and see what they have, or can order. (My local public library can get any book in any county library in a few days, in a Welsh library in a week or so, and in England in a little longer. If it isn't held, I can request they purchase it for a small fee. You will probably find that yours can do much the same thing.
Look at Addison Wesley, or Wrox - they both do good (if very thick) books on the subject.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
I have an asmx Web Service hosted on our secure website which is consumed from a c# library that is used by several WinForm desktop Applications.
Currently, I can only get to the ws by using the actual ip (instead of the web address) end the endpoints / bindings. This works wonderfully for our in network users, however we have out of network users as well.
I should add that I can access the direct url to the ws from out of network which shows the test page, however the tests all return errors (unless within network).
The error I get testing is that the request content-type is expecting xml but receiving html response. This just probably means it is returning an error instead of the xml content.
Has anyone else conquered this issue? Any help would be greatly appreciated...
|
|
|
|
|
I have created a form in a tabcontrol -> tabpage, it has a contract format and I need to print it. So, I heard about PrintDocument but I don't really know how should I use it to print a tabpage because it has a large height and it should be printed on multiple pages. Any suggestions please? Thanks
|
|
|
|
|
That's what a PrintDocument is for - it allows you to select exactly what is printed, and where it is printed, in what font, what colours, etc.
What it doesn't do is "print a control" such as a tap page - because that's silly. The control is very unlikely to conform to the form factor of the paper being printed onto (and it'll have a "screen based" resolution rather than a "printout based" resolution, which is generally a lot, lot higher.
Have a look at the documentation: https://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument(v=vs.110).aspx[^] - it includes a simple example.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Well, which is the right way to print a form with textboxes, labels in a specific location in form? In that example it prints a text file. But in that way, it prints the whole windows form. Or, is there any third way? For example to send data in a word document?
|
|
|
|
|
Why would you want to print text boxes? Do you expect the user to type in them?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
No, I mean the shape of textbox..I have to print a specific design of the form, as I said, its format is as a contract..it's not just some simple text..
|
|
|
|
|
If you look at the example, it draws the text via the DrawText method of the Graphics object.
A quick look at the documentation would show you there are a lot of other Draw... methods. Including lines, rectangles, circles, paths, images, filled and unfilled.
So if you want a form with boxes for the user to write in, then DrawRectangle is probably a good place to start...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Ok then, it seems that this is the solution. Thank you for your time and help.
|
|
|
|
|
I would like to track user mac address from code behind when user is browsing my website.
|
|
|
|
|
Fortunately you can't do that, your ARP requests won't make it to the user.
|
|
|
|
|
Just to add to what Harold said, you can do it, under very specialized circumstances.
The user has to be running IE (not likely, and soon to be even less likely with Win10/Edge released)
The user has to allow ActiveX controls to run (not likely, they are disabled by default)
The user has to allow ActiveX controls to download (not likely, that is also disabled by default)
Then all you have to do is write an ActiveX...and it will work for far less than one percent of your visitors.
And it is so easy to "spoof" MAC addresses that it isn't worth trusting them anyway!
If this is for security, forget it!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
If you google this strangely common request you'll find the exact same answer given to everyone else who asks this....you can't.
|
|
|
|
|
|
what is cookie.discard? and how to use?
anybody know please tell me.
|
|
|
|