Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm currently creating a networking library. I want to make 2 base classes for the library like TCPServer, and UDPServer that should be accessed by the 1 script only(Server Script). I don't want any other script to access the those two scripts. How would I accomplish that?
EDIT: I tried making a parameter in the constructor of the base classes of type dynamic passing in thisand then the constructor would check if this object passed in is a Server object. I'm just asking if there is a better way of doing it.
I found the solution, just use the internal keyword to make an object accessible from the current assembly only.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 days ago.
Improve this question
I am trying to create a piece of software than can manage your computer and clean some things up, and one of the things I am trying to incorporate is adblocking.
I have looked online multiple times for something like this, but haven't found anything. The most I amounted to is the webbrowser class.
If someone could help me discern how to change an html file using the webbrowser class, that would be greatly appreciated.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I create a function in c# to query ikea tradfri, here the result :
"<//15001/65536>;ct=0;obs,<//15001/65537>;ct=0;obs,<//15004/136834>;ct=0;obs,<//15005/136834/217609>;ct=0;obs,<//15005/136834/218326>;ct=0;obs,<//15005/136834/224384>;ct=0;obs,<//15005/136834>;ct=0;obs,<//15001>;ct=0;obs,<//15001/reset>;ct=0,<//status>;ct=0;obs,<//15005>;ct=0;obs,<//15004>;ct=0;obs,<//15004/add>;ct=0,<//15004/remove>;ct=0,<//15006>;ct=0;obs,<//15011/15012>;ct=0;obs,<//15011/9034>;ct=0,<//15011/9030>;ct=0,<//15011/9031>;ct=0,<//15011/9063>;ct=0,<//15011/9033>;ct=0,<//15010>;ct=0;obs"
Now I need to isolate everything that start with //15001/
I try JavaScript serializer or Newsoft but I don't achieve to get everything in order to go through.
Do you have tips to deserialize this kind of data in c# ?
thank for your help !
It looks like you are trying to query a CoAP service/endpoint. Awesome stuff, fortunately theres already open source implementations of the CoAP standard, including resource parsing, URI resolution, among others.
Here's a C# library that's linked from the CoAP Wiki page
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How do I get the Stream of the cursor defined inside System.Windows.Input.Cursor?
Thanks.
Short answer, you cannot. After reviewing the MSDN, the stream is part of the constructor and not accessible afterward most likely making it a private property.
In all my years, I cannot say that I have ever used the "Cursor" constructor like that either, but I guess if you had to pass a customized mouse cursor that is how you would do it.
https://msdn.microsoft.com/en-us/library/system.windows.input.cursor(v=vs.110).aspx
What are you trying to accomplish? What have you already tried(purely out of my own curiosity)?
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am trying to implement a cross-process event architecture where processes can "subscribe" to events, and then "unsubscribe".
My initial tests using EventWaitHandle are promising (although I've read some negative comments about them, but please set that aside for now).
Since these things are named, and are in fact opened by name using OpenExisting, I was a little surprised to find that the EventWaitHandle class does not have a Name property, so that given a collection of them I can find the one for a given name.
So, given a collection of these things, is there no way to see what name was used to create each one?
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to simulate a virus spread throughout a population. I have a Human class with specific properties and I want to also simulate reproduction and make another Human object when the reproductionTimer runs out in each Human object and delete the object if it reaches a randomly generated age from 20-100 or if it dies from the virus.
How would I do this since it requires making objects at runtime? Specifically I would like to know how to reference each object, because I need to simulate interaction too.
Just create the objects and put them into a container of some sort (a List<Human> or maybe a Queue<Human>.
Then check every time step to see if your humans have reached a certain age and kill them.